Catmandu::Fix::inspire - a Catmandu Fix, which filters appropriate fields, e.g doi, arxivId, etc.
use Catmandu::Importer::Inspire; use Catmandu::Fix::inspire; my $fixer = Catmandu::Fix->new(fixes => ['inspire_extract_id()']); # get data via doi my $importer = Catmandu::Importer::Inspire->new(format => 'marc', doi => "10.1088/1126-6708/2009/03/112"); # or via inspire id #my $importer = Catmandu::Importer::Inspire->new(format => 'marc', id => "811388"); # gives an interable object $newRec; my $newRec = $fixer->fix($importer); use Data::Dumper; print Dumper $newRec->first;
To install Catmandu::Inspire, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::Inspire
CPAN shell
perl -MCPAN -e shell install Catmandu::Inspire
For more information on module installation, please visit the detailed CPAN module installation guide.