Parser.pm untested

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