File Coverage

blib/lib/XML/Stream/XPath.pm
Criterion Covered Total %
statement 21 27 77.7
branch 0 2 0.0
condition n/a
subroutine 7 8 87.5
pod 0 1 0.0
total 28 38 73.6


line stmt bran cond sub pod time code
1             ##############################################################################
2             #
3             # This library is free software; you can redistribute it and/or
4             # modify it under the terms of the GNU Library General Public
5             # License as published by the Free Software Foundation; either
6             # version 2 of the License, or (at your option) any later version.
7             #
8             # This library is distributed in the hope that it will be useful,
9             # but WITHOUT ANY WARRANTY; without even the implied warranty of
10             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11             # Library General Public License for more details.
12             #
13             # You should have received a copy of the GNU Library General Public
14             # License along with this library; if not, write to the
15             # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16             # Boston, MA 02111-1307, USA.
17             #
18             # Jabber
19             # Copyright (C) 1998-2004 Jabber Software Foundation http://jabber.org/
20             #
21             ##############################################################################
22              
23             package XML::Stream::XPath;
24              
25 12     12   284 use 5.008;
  12         41  
  12         449  
26 12     12   60 use strict;
  12         20  
  12         438  
27 12     12   52 use warnings;
  12         16  
  12         419  
28 12     12   52 use vars qw( $VERSION %FUNCTIONS );
  12         25  
  12         798  
29              
30             $VERSION = "1.24";
31              
32 12     12   4842 use XML::Stream::XPath::Value;
  12         61  
  12         371  
33 12     12   5796 use XML::Stream::XPath::Op;
  12         487  
  12         417  
34 12     12   6324 use XML::Stream::XPath::Query;
  12         34  
  12         1034  
35              
36             sub AddFunction
37             {
38 0     0 0   my $function = shift;
39 0           my $code = shift;
40 0 0         if (!defined($code))
41             {
42 0           delete($FUNCTIONS{$code});
43 0           return;
44             }
45              
46 0           $FUNCTIONS{$function} = $code;
47             }
48              
49              
50             1;
51