PICA::Writer::Base - Base class of PICA+ writers
use PICA::Writer::Plain; my $writer = PICA::Writer::Plain->new( $fh ); foreach my $record (@pica_records) { $writer->write($record); } use PICA::Writer::Plus; $writer = PICA::Writer::Plus->new( $fh ); ... use PICA::Writer::XML; $writer = PICA::Writer::XML->new( $fh ); ...
This abstract base class of PICA+ writers should not be instantiated directly. Use one of the following subclasses instead:
Create a new PICA writer, writing to STDOUT by default. The optional fh argument can be a filename, a handle or any other blessed object with a print method, e.g. IO::Handle.
fh
print
PICA::Data also provides a functional constructor pica_writer.
pica_writer
Writes one or more records, given as hash with key 'record' or as array reference with a list of fields, as described in PICA::Data.
record
Writes one record.
See Catmandu::Exporter::PICA for usage of this module within the Catmandu framework (recommended).
Alternative (outdated) PICA+ writers had been implemented as PICA::Writer and PICA::XMLWriter included in the release of PICA::Record.
To install PICA::Data, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PICA::Data
CPAN shell
perl -MCPAN -e shell install PICA::Data
For more information on module installation, please visit the detailed CPAN module installation guide.