PICA::Writer - Write and count PICA+ records and fields
my $writer = PICA::Writer->new(\*STDOUT); $writer->write( $record ); $writer->write( $comment, $record ); print $writer->counter() . " records, " . $writer->fields() . " fields\n"; $writer->writefield( $field ); $writer->reset();
This module contains a simple class to write and count PICA+ records and fields (printing of single fields may not be possible in all implementations).
Create a new parser. Needs a reference to a file handle or a file name. If no parameter is specified then the writer will not write but count only.
Reset the writer by setting the counters to zero. You may also specify a new file handler or file name.
Reset the file handler or file name without resetting the counters.
Write a record(s) of type PICA::Record. You may specify strings before a record that will be used as a comment:
$writer->write( $record ); $writer->write( @records ); $writer->write( "Record number: $counter", $record );
Write one ore more PICA::Field. Please be aware that the output will not be wellformed PICA+ if you have not written a start record marker before!
PICA::Field
Returns the number of written records.
Returns the number of written fields.
Returns the name of the writer (usually the filename) if defined.
Jakob Voss <jakob.voss@gbv.de>
<jakob.voss@gbv.de>
Copyright (C) 2007 by Verbundzentrale Goettingen (VZG) and Jakob Voss
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install PICA::Record, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PICA::Record
CPAN shell
perl -MCPAN -e shell install PICA::Record
For more information on module installation, please visit the detailed CPAN module installation guide.