PICA::Parser::Base - abstract base class of PICA parsers
use PICA::Parser::Plain; my $parser = PICA::Parser::Plain->new( $filename ); while ( my $record = $parser->next ) { # do something } use PICA::Parser::Plus; my $parser = PICA::Parser::Plus->new( $filename, bless => 1 ); ... # records will be instances of PICA::Data use PICA::Parser::XML; my $parser = PICA::Parser::XML->new( $filename, start => 1 ); ...
This abstract base class of PICA+ parsers should not be instantiated directly. Use one of the following subclasses instead:
Return records as instances of PICA::Data (disabled by default).
By default faulty fields in records are skipped with warnings. You can make them fatal by setting the strict parameter to 1.
Initialize parser to read from a given file, handle (e.g. IO::Handle), or reference to a Unicode string. PICA::Parser::XML also detects plain XML strings.
Reads the next PICA+ record. Returns a (optionally blessed) hash with keys _id and record, as defined in PICA::Data.
_id
record
See Catmandu::Importer::PICA for usage of this module in Catmandu.
Alternative PICA parsers had been implemented as PICA::PlainParser and PICA::XMLParser and included in the release of PICA::Record (DEPRECATED).
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.