Atom.pm

filter: Statementstmt 80.9% 34 / 42 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 10 / 15 Podpod 0.0% 0 / 2 totaltotal 73.0% 46 / 63 CC 3 SCAR 4.7
CC
3
Cov
78%
BEGIN
3.3
__ANON__
2.0
expat_parser
2.0
CRAP 1.6
« Atom/Base.pm ↑ Summary Atom/Entry.pm »
1 # $Id$
2  
3 package XML::Atom;
4 23 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 23 ▶use 5.008_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 23 our $VERSION = '0.43';
8  
9 23 ▶BEGIN {
Subroutine BEGIN: called CC=3 SCAR=11.9
10 23 @XML::Atom::EXPORT = qw( LIBXML DATETIME);
11 23 ▶ if (eval { require XML::LibXML }) {
Branch: 1 branch
BranchTrueFalseTotal
if (eval { do { require XML::LibXML } }) { } 23 0 23
12 23 *{XML::Atom::LIBXML} = sub() {1};
13 } else {
14 0 require XML::XPath;
15 0 *{XML::Atom::LIBXML} = sub() {0};
16 }
17 23 ▶ if (eval { require DateTime::Format::Atom }) {
Branch: 1 branch
BranchTrueFalseTotal
if (eval { do { require DateTime::Format::Atom } }) { } 0 23 23
18 0 *{XML::Atom::DATETIME} = sub() {1};
19 } else {
20 23 *{XML::Atom::DATETIME} = sub() {0};
21 }
22  
23 23 $XML::Atom::ForceUnicode = 0;
24 23 $XML::Atom::DefaultVersion = 0.3;
25 }
26  
27 34 ▶sub libxml_parser {
Subroutine libxml_parser: called CC=1 SCAR=2.6
Pod undocumented
28 ## uses old XML::LibXML < 1.70 interface for compat reasons
29 return XML::LibXML->new(
30 #no_network => 1, # v1.63+
31 expand_xinclude => 0,
32 expand_entities => 1,
33 load_ext_dtd => 0,
34 0 ▶ ext_ent_handler => sub { warn "External entities disabled."; '' },
Subroutine __ANON__: not called CC=1 SCAR=6.9
35 34 );
36 }
37  
38 0 ▶sub expat_parser {
Subroutine expat_parser: not called CC=1 SCAR=6.9
Pod undocumented
39 return XML::Parser->new(
40 Handlers => {
41 0 ▶ ExternEnt => sub { warn "External Entities disabled."; '' },
Subroutine __ANON__: not called CC=1 SCAR=6.9
42 0 ▶ ExternEntFin => sub {},
Subroutine __ANON__: not called CC=1 SCAR=0.0
43 },
44 0 );
45 }
46  
47 23 ▶use base qw( XML::Atom::ErrorHandler Exporter );
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 package XML::Atom::Namespace;
50 23 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
51  
52 9 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
53 9 my $class = shift;
54 9 my($prefix, $uri) = @_;
55 9 bless { prefix => $prefix, uri => $uri }, $class;
56 }
57  
58 0 ▶sub DESTROY { }
Subroutine DESTROY: not called CC=1 SCAR=0.0
59  
60 23 ▶use vars qw( $AUTOLOAD );
Subroutine BEGIN: called CC=1 SCAR=0.0
61 5 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=1 SCAR=0.0
62 5 (my $var = $AUTOLOAD) =~ s!.+::!!;
63 23 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
64 5 ($_[0], $var);
65 }
66  
67 23 1;
68 __END__
« Atom/Base.pm ↑ Summary Atom/Entry.pm »