The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lab::Moose::DataFolder - Create a data directory with meta data

VERSION

version 3.901

DESCRIPTION

A data logging setup consists of one Lab::Moose::DataFolder and one or more Lab::Moose::DataFile objects which live inside the DataFolder.

METHODS

new

 my $folder = Lab::Moose::DataFolder->new(path => 'foldername');
 # or equivalently use Lab::Moose loader:
 use Lab::Moose; my $folder = datafolder(path => 'foldername');

The actual foldername will consist of the path argument and a numeric suffix. Calling this function repeatedly will create the directories foldername_001, foldername_002, ..., foldername_999, foldername_1000.

After creation, the actual filename is contained in the path attribute:

 my $path = $folder->path();

This method will create the following files in the folder:

<SCRIPT> .pl

A copy of the user script. You can change the name of this script by setting the script_name attribute in the constructor. In case you don't want the script to be copied, just set copy_script to 0 when creating your DataFolder.

META.yml

A YAML file containing meta data. The Lab::Moose::DataFile::Meta object is contained in the meta_file attribute:

 my $meta_file = $folder->meta_file();

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 by the Lab::Measurement team; in detail:

  Copyright 2016       Simon Reinhardt
            2017-2018  Andreas K. Huettel, Simon Reinhardt
            2021       Fabian Weinelt

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.