Serializer/Config/General.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 3 / 3 totaltotal 100% 36 / 36 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Serializer/Bencode.pm ↑ Summary Serializer/Convert/Bencode.pm »
1 package Data::Serializer::Config::General;
2 12 ▶BEGIN { @Data::Serializer::Config::General::ISA = qw(Data::Serializer) }
Subroutine BEGIN: called CC=1 SCAR=0.0
3 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 12 ▶use Config::General;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use vars qw($VERSION @ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 $VERSION = '0.02';
9 184 ▶sub options {
Subroutine options: called CC=1 SCAR=0.0
Pod documented
10 184 return (shift)->{options};
11 }
12  
13 92 ▶sub serialize {
Subroutine serialize: called CC=1 SCAR=0.0
Pod documented
14 92 my $self = (shift);
15 92 my $ref = (shift);
16 92 return (new Config::General(%{$self->options()}, -ConfigHash => $ref))->save_string();
17 }
18  
19 92 ▶sub deserialize {
Subroutine deserialize: called CC=1 SCAR=0.0
Pod documented
20 92 my $self = (shift);
21 92 my $ref = (shift);
22 92 my %hash = (new Config::General(%{$self->options()}, -String => $ref))->getall();
23 92 return \%hash;
24 }
25  
26 12 1;
27  
28 __END__
« Serializer/Bencode.pm ↑ Summary Serializer/Convert/Bencode.pm »