| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
141990
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
34
|
|
|
2
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
100
|
|
|
3
|
|
|
|
|
|
|
package YAML::PP::Schema::Tie::IxHash; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = 'v0.40.0'; # VERSION |
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use base 'YAML::PP::Schema'; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
410
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use Scalar::Util qw/ blessed reftype /; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
143
|
|
|
10
|
|
|
|
|
|
|
my $ixhash = eval { require Tie::IxHash }; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub register { |
|
13
|
0
|
|
|
0
|
1
|
|
my ($self, %args) = @_; |
|
14
|
0
|
|
|
|
|
|
my $schema = $args{schema}; |
|
15
|
0
|
0
|
|
|
|
|
unless ($ixhash) { |
|
16
|
0
|
|
|
|
|
|
die "You need to install Tie::IxHash in order to use this module"; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$schema->add_representer( |
|
20
|
|
|
|
|
|
|
tied_equals => 'Tie::IxHash', |
|
21
|
|
|
|
|
|
|
code => sub { |
|
22
|
0
|
|
|
0
|
|
|
my ($rep, $node) = @_; |
|
23
|
0
|
|
|
|
|
|
$node->{items} = [ %{ $node->{data} } ]; |
|
|
0
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return 1; |
|
25
|
|
|
|
|
|
|
}, |
|
26
|
0
|
|
|
|
|
|
); |
|
27
|
0
|
|
|
|
|
|
return; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |