| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Data::Encoder::Data::Dumper; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
603
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
31
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use Carp (); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
13
|
|
|
6
|
1
|
|
|
1
|
|
11
|
use Data::Dumper (); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
354
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
|
9
|
2
|
|
|
2
|
0
|
1278
|
my ($class, $args) = @_; |
|
10
|
2
|
|
100
|
|
|
11
|
$args ||= {}; |
|
11
|
2
|
|
|
|
|
12
|
bless { %$args }, __PACKAGE__; |
|
12
|
|
|
|
|
|
|
} |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub encode { |
|
15
|
2
|
|
|
2
|
0
|
12
|
my ($self, $stuff, @args) = @_; |
|
16
|
2
|
|
|
|
|
3
|
local $Data::Dumper::Terse = 1; |
|
17
|
2
|
|
|
|
|
3
|
local $Data::Dumper::Purity = 1; |
|
18
|
2
|
|
|
|
|
5
|
local $Data::Dumper::Indent = 0; |
|
19
|
2
|
|
|
|
|
11
|
my $dumper = Data::Dumper->new([$stuff], @args); |
|
20
|
2
|
|
|
|
|
62
|
for my $method (keys %$self) { |
|
21
|
1
|
|
|
|
|
5
|
$dumper->$method($self->{$method}); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
2
|
|
|
|
|
18
|
return $dumper->Dump; |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub decode { |
|
27
|
2
|
|
|
2
|
0
|
937
|
my ($self, $stuff, @args) = @_; |
|
28
|
2
|
|
|
|
|
3
|
local $@; |
|
29
|
2
|
|
|
|
|
103
|
my $res = eval $stuff; ## no critic |
|
30
|
2
|
50
|
|
|
|
8
|
Carp::croak $@ if $@; |
|
31
|
2
|
|
|
|
|
11
|
return $res; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
|
35
|
|
|
|
|
|
|
__END__ |