Serializer/XML/Simple.pm

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 94.7% 36 / 38 CC 3 SCAR 3.7
CC
3
Cov
93%
serialize
2.0
deserialize
2.0
BEGIN
1.0
CRAP 1.4
« Serializer/Storable.pm ↑ Summary Serializer/Bencode.pm »
1 package Data::Serializer::XML::Simple;
2 12 ▶BEGIN { @Data::Serializer::XML::Simple::ISA = qw(Data::Serializer) }
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use XML::Simple qw();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 12 ▶use vars qw($VERSION @ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 12 $VERSION = '0.03';
10  
11  
12 132 ▶sub serialize {
Subroutine serialize: called CC=2 SCAR=7.0
Pod documented
13 132 my $self = (shift);
14 132 ▶ my %options = ref $self->{options} eq 'HASH' ? %{$self->{options}}: ();
Branch: 1 branch
BranchTrueFalseTotal
ref $self->{'options'} eq 'HASH' ? : 132 0 132
15 132 my $xml = XML::Simple->new(keyattr => [ 'name'], %options);
16 132 return $xml->XMLout( (shift) );
17 }
18  
19 132 ▶sub deserialize {
Subroutine deserialize: called CC=2 SCAR=7.0
Pod documented
20 132 my $self = (shift);
21 132 ▶ my %options = ref $self->{options} eq 'HASH' ? %{$self->{options}}: ();
Branch: 1 branch
BranchTrueFalseTotal
ref $self->{'options'} eq 'HASH' ? : 132 0 132
22 132 my $xml = XML::Simple->new(keyattr => [ 'name'], %options);
23 132 return $xml->XMLin( (shift) );
24 }
25  
26 12 1;
27 __END__
« Serializer/Storable.pm ↑ Summary Serializer/Bencode.pm »