Debian Codegraph @

examples/parsing/openurl2.pl

raw
1 #!/usr/bin/perl
2
3 # This (slightly more involved) example parses a reference,
4 # decomposes it (to get spage, epage, etc), trims it to remove
5 # any non-OpenURL fields, and then dumps the metadata.
6
7 use Biblio::Citation::Parser::Standard;
8 use Biblio::Citation::Parser::Utils;
9 use Data::Dumper;
10
11 $ref = "Jewell, M (2002) Making Examples for Reference Parsers. Journal of Example Writing 3:100-150.";
12
13 my $cit_parser = new Biblio::Citation::Parser::Standard;
14 print "- Parsing $ref\n";
15 $metadata = $cit_parser->parse($ref);
16 print "- Decomposing and trimming metadata\n";
17 $metadata = trim_openurl(decompose_openurl($metadata));
18 print "- Metadata dump follows:\n";
19 print Dumper($metadata);