Parser.pm

filter: Statementstmt 68.7% 11 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 68.1% 15 / 22 CC 1 SCAR 4.1
CC
1
Cov
69%
new
2.0
parse
2.0
BEGIN
1.0
CRAP 1.5
« Parser/Jiao/Utility.pm ↑ Summary Parser/Templates.pm »
1 package Biblio::Citation::Parser;
2  
3 ######################################################################
4 #
5 # Biblio::Citation::Parser;
6 #
7 ######################################################################
8 #
9 # This file was originally part of ParaCite Tools, based at
10 # http://paracite.eprints.org/developers/
11 #
12 #
13 # Copyright (c) 2004 University of Southampton, UK. SO17 1BJ.
14 #
15 # ParaTools is free software; you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation; either version 2 of the License, or
18 # (at your option) any later version.
19 #
20 # ParaTools is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
24 #
25 # You should have received a copy of the GNU General Public License
26 # along with ParaTools; if not, write to the Free Software
27 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #
29 ######################################################################
30  
31 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 1 require Exporter;
35 1 our @ISA = qw(Exporter);
36 1 our @EXPORT_OK = ( 'parse', 'new' );
37  
38 1 $VERSION = "1.10";
39  
40 =pod
41  
42 =head1 NAME
43  
44 B<Biblio::Citation::Parser> - citation parsing framework
45  
46 =head1 DESCRIPTION
47  
48 Biblio::Citation::Parser provides generic methods for reference parsers. This
49 class should not be used directly, but rather be overridden by specific
50 parsers. Parsers that extend the Parser class must provide at least
51 the two methods defined here to ensure compatibility.
52  
53 =head1 METHODS
54  
55 =over 4
56  
57 =item $cite_parser = Biblio::Citation::Parser-E<gt>new()
58  
59 The new() method creates a new parser instance.
60  
61 =cut
62  
63 sub new
64 0 ▶{
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
65 0 my($class) = @_;
66 0 my $self = {};
67 0 return bless($self, $class);
68 }
69  
70 =pod
71  
72 =item $metadata = $parser-E<gt>parse($reference)
73  
74 The parse() method takes a reference and returns the extracted metadata.
75  
76 =cut
77  
78 sub parse
79 0 ▶{
Subroutine parse: not called CC=1 SCAR=6.9
Pod documented
80 0 my($self, $ref) = @_;
81 0 die "This method should be overridden.\n";
82 }
83  
84 1 1;
85  
86 __END__
« Parser/Jiao/Utility.pm ↑ Summary Parser/Templates.pm »