lib/XML/XMetaL/Mock/DOMElement.pm

filter: Statementstmt 100% 49 / 49 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 13 / 13 Podpod 0.0% 0 / 1 totaltotal 91.4% 64 / 70 CC 3 SCAR 3.4
CC
3
Cov
94%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« lib/XML/XMetaL/Utilities/Abstract.pm ↑ Summary lib/XML/XMetaL/Registry.pm »
1 package XML::XMetaL::Mock::DOMElement::Tie;
2
3 2 ▶use Tie::Hash;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use base 'Tie::StdHash';
Subroutine BEGIN: called CC=1 SCAR=0.0
5
6 3 ▶sub TIEHASH {
Subroutine TIEHASH: called CC=1 SCAR=0.0
7 3 my ($class, $object) = @_;
8 3 my $self = bless $object, $class;
9 3 return $self;
10 }
11
12 #sub STORE {
13 # my ($self, $key, $value) = @_;
14 # $self->{$key} = $value;
15 # $self->{length} = length $value if $key eq 'data';
16 #}
17
18 package XML::XMetaL::Mock::DOMElement;
19
20 2 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
23
24 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 ▶use Hash::Util qw(lock_keys);
Subroutine BEGIN: called CC=1 SCAR=0.0
26 2 ▶use Tie::Hash;
Subroutine BEGIN: called CC=1 SCAR=0.0
27
28 2 ▶use base ('Tie::StdHash', 'XML::XMetaL::Mock::DOMNode');
Subroutine BEGIN: called CC=1 SCAR=0.0
29
30 2 ▶use constant TRUE => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 2 ▶use constant FALSE => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
32
33 2 our @keys = qw(
34 localName
35 namespaceURI
36 prefix
37 tagName
38 );
39
40
41 3 ▶sub new {
Subroutine new: called CC=3 SCAR=11.1
Pod undocumented
42 3 my ($class, %args) = @_;
43 3 my %self;
44 my $self;
45 3 eval {
46 3 my %properties;
47 3 @properties{@keys} = @args{@keys};
48 3 my $super_class = $class->SUPER::new(%args);
49 3 %properties = (
50 %$super_class,
51 %properties,
52 );
53 3 tie %self, 'XML::XMetaL::Mock::DOMElement::Tie', \%properties;
54 3 ▶ $self = bless \%self, ref($class) || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
030
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
55 3 lock_keys(%$self, keys %$self);
56
57 };
58 3 ▶ croak $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 3 3
59 3 return $self;
60 }
61
62 #getAttribute
63 #getAttributeNS
64 #getAttributeNode
65 #getAttributeNodeNS
66 #getElementsByTagName
67 #getElementsByTagNameNS
68 #hasAttribute
69 #hasAttributeNS
70 #normalize
71 #removeAttribute
72 #removeAttributeNS
73 #removeAttributeNode
74 #setAttribute
75 #setAttributeNS
76 #setAttributeNode
77 #setAttributeNodeNS
78
79
80 2 1;
81 __END__
« lib/XML/XMetaL/Utilities/Abstract.pm ↑ Summary lib/XML/XMetaL/Registry.pm »