Lab::Data::Writer - Write data to disk


Lab-Tools documentation  | view source Contained in the Lab-Tools distribution.

Index


NAME

Top

Lab::Data::Writer - Write data to disk

SYNOPSIS

Top

    use Lab::Data::Writer;

    my $writer=new Lab::Data::Writer($filename,$config);

    $writer->log_comment("This is my test log");

    my $num=$writer->log_start_block();
    $writer->log_line(1,2,3);

DESCRIPTION

Top

This module can be used to log data to a file, comfortably.

CONSTRUCTOR

Top

new

    $writer=new Lab::Data::Writer($filename,$config);

See configure below for available configuration options.

METHODS

Top

configure

    $writer->configure(\%config);

Available options and default values are

    output_data_ext     => "DATA",
    output_meta_ext     => "META",

    output_col_sep      => "\t",
    output_line_sep     => "\n",
    output_block_sep    => "\n",
    output_comment_char => "# ",

get_filename

    ($filename,$filepath)=$writer->get_filename()

log_comment

    $writer->log_comment($comment);

Writes a comment to the file.

log_line

    $writer->log_line(@data);

Writes a line of data to the file.

log_start_block

    $num=$writer->log_start_block();

Starts a new data block.

import_gpplus(%opts)

Imports GPplus TSK-files. Valid parameters are

  filename => 'path/to/one/of/the/tsk-files',
  newname  => 'path/to/new/directory/newname',
  archive  => '[copy|move]'

The path path/to/new/directory/ must exist, while newname shall not exist there.

AUTHOR/COPYRIGHT

Top


Lab-Tools documentation  | view source Contained in the Lab-Tools distribution.