line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package YAML::Old::Mo; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# use Mo qw[builder default import]; |
4
|
|
|
|
|
|
|
# The following line of code was produced from the previous line by |
5
|
|
|
|
|
|
|
# Mo::Inline version 0.31 |
6
|
36
|
100
|
33
|
36
|
|
195
|
no warnings;my$M=__PACKAGE__.'::';*{$M.Object::new}=sub{bless{@_[1..$#_]},$_[0]};*{$M.import}=sub{import warnings;$^H|=1538;my($P,%e,%o)=caller.'::';shift;eval"no Mo::$_",&{$M.$_.::e}($P,\%e,\%o,\@_)for@_;return if$e{M};%e=(extends,sub{eval"no $_[0]()";@{$P.ISA}=$_[0]},has,sub{my$n=shift;my$m=sub{$#_?$_[0]{$n}=$_[1]:$_[0]{$n}};$m=$o{$_}->($m,$n,@_)for sort keys%o;*{$P.$n}=$m},%e,);*{$P.$_}=$e{$_}for keys%e;@{$P.ISA}=$M.Object};*{$M.'builder::e'}=sub{my($P,$e,$o)=@_;$o->{builder}=sub{my($m,$n,%a)=@_;my$b=$a{builder}or return$m;sub{$#_?$m->(@_):!exists$_[0]{$n}?$_[0]{$n}=$_[0]->$b:$m->(@_)}}};*{$M.'default::e'}=sub{my($P,$e,$o)=@_;$o->{default}=sub{my($m,$n,%a)=@_;$a{default}or return$m;sub{$#_?$m->(@_):!exists$_[0]{$n}?$_[0]{$n}=$a{default}->(@_):$m->(@_)}}};my$i=\&import;*{$M.import}=sub{(@_==2 and not $_[1])?pop@_:@_==1?push@_,grep!/import/,@f:();goto&$i};@f=qw[builder default import];use strict;use warnings; |
|
36
|
100
|
|
36
|
|
65
|
|
|
36
|
100
|
|
36
|
|
45824
|
|
|
36
|
100
|
|
36
|
|
254
|
|
|
36
|
100
|
|
36
|
|
79
|
|
|
36
|
100
|
|
35
|
|
2529
|
|
|
36
|
100
|
|
35
|
|
188
|
|
|
36
|
100
|
|
35
|
|
73
|
|
|
36
|
100
|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2
|
|
|
|
|
773
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
2
|
|
|
|
|
411
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
380
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
6201
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
116277
|
|
|
|
|
468735
|
|
|
18678
|
|
|
|
|
73939
|
|
|
15039
|
|
|
|
|
75272
|
|
|
20446
|
|
|
|
|
604209
|
|
|
6862
|
|
|
|
|
48723
|
|
|
807
|
|
|
|
|
2584
|
|
|
91062
|
|
|
|
|
411761
|
|
|
8756
|
|
|
|
|
83028
|
|
|
1937
|
|
|
|
|
679703
|
|
|
2409
|
|
|
|
|
13735
|
|
|
849
|
|
|
|
|
3145
|
|
|
824
|
|
|
|
|
4546
|
|
|
679
|
|
|
|
|
4116
|
|
|
828
|
|
|
|
|
3757
|
|
|
656
|
|
|
|
|
4774
|
|
|
523
|
|
|
|
|
2286
|
|
|
474
|
|
|
|
|
4687
|
|
|
650
|
|
|
|
|
4042
|
|
|
1701
|
|
|
|
|
8485
|
|
|
571
|
|
|
|
|
3904
|
|
|
469
|
|
|
|
|
2893
|
|
|
809
|
|
|
|
|
34587
|
|
|
356
|
|
|
|
|
1775
|
|
|
314
|
|
|
|
|
7710
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $DumperModule = 'Data::Dumper'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my ($_new_error, $_info, $_scalar_info); |
11
|
|
|
|
|
|
|
|
12
|
36
|
|
|
36
|
|
267
|
no strict 'refs'; |
|
36
|
|
|
|
|
72
|
|
|
36
|
|
|
|
|
29569
|
|
13
|
|
|
|
|
|
|
*{$M.'Object::die'} = sub { |
14
|
34
|
|
|
34
|
|
101
|
my $self = shift; |
15
|
34
|
|
|
|
|
106
|
my $error = $self->$_new_error(@_); |
16
|
34
|
|
|
|
|
98
|
$error->type('Error'); |
17
|
34
|
|
|
|
|
151
|
Carp::croak($error->format_message); |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
*{$M.'Object::warn'} = sub { |
21
|
6
|
|
|
6
|
|
14
|
my $self = shift; |
22
|
6
|
50
|
|
|
|
25
|
return unless $^W; |
23
|
6
|
|
|
|
|
18
|
my $error = $self->$_new_error(@_); |
24
|
6
|
|
|
|
|
22
|
$error->type('Warning'); |
25
|
6
|
|
|
|
|
137
|
Carp::cluck($error->format_message); |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# This code needs to be refactored to be simpler and more precise, and no, |
29
|
|
|
|
|
|
|
# Scalar::Util doesn't DWIM. |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
# Can't handle: |
32
|
|
|
|
|
|
|
# * blessed regexp |
33
|
|
|
|
|
|
|
*{$M.'Object::node_info'} = sub { |
34
|
3605
|
|
|
3605
|
|
4331
|
my $self = shift; |
35
|
3605
|
|
100
|
|
|
11963
|
my $stringify = $_[1] || 0; |
36
|
|
|
|
|
|
|
my ($class, $type, $id) = |
37
|
|
|
|
|
|
|
ref($_[0]) |
38
|
|
|
|
|
|
|
? $stringify |
39
|
|
|
|
|
|
|
? &$_info("$_[0]") |
40
|
3605
|
100
|
|
|
|
8707
|
: do { |
|
|
100
|
|
|
|
|
|
41
|
3584
|
|
|
|
|
18201
|
require overload; |
42
|
3584
|
|
|
|
|
10231
|
my @info = &$_info(overload::StrVal($_[0])); |
43
|
3584
|
100
|
|
|
|
13188
|
if (ref($_[0]) eq 'Regexp') { |
44
|
1
|
|
|
|
|
2
|
@info[0, 1] = (undef, 'REGEXP'); |
45
|
|
|
|
|
|
|
} |
46
|
3584
|
|
|
|
|
10452
|
@info; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
: &$_scalar_info($_[0]); |
49
|
3605
|
100
|
|
|
|
11318
|
($class, $type, $id) = &$_scalar_info("$_[0]") |
50
|
|
|
|
|
|
|
unless $id; |
51
|
3605
|
50
|
|
|
|
16685
|
return wantarray ? ($class, $type, $id) : $id; |
52
|
|
|
|
|
|
|
}; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
55
|
|
|
|
|
|
|
$_info = sub { |
56
|
|
|
|
|
|
|
return (($_[0]) =~ qr{^(?:(.*)\=)?([^=]*)\(([^\(]*)\)$}o); |
57
|
|
|
|
|
|
|
}; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$_scalar_info = sub { |
60
|
|
|
|
|
|
|
my $id = 'undef'; |
61
|
|
|
|
|
|
|
if (defined $_[0]) { |
62
|
|
|
|
|
|
|
\$_[0] =~ /\((\w+)\)$/o or CORE::die(); |
63
|
|
|
|
|
|
|
$id = "$1-S"; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
return (undef, undef, $id); |
66
|
|
|
|
|
|
|
}; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
$_new_error = sub { |
69
|
|
|
|
|
|
|
require Carp; |
70
|
|
|
|
|
|
|
my $self = shift; |
71
|
|
|
|
|
|
|
require YAML::Old::Error; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my $code = shift || 'unknown error'; |
74
|
|
|
|
|
|
|
my $error = YAML::Old::Error->new(code => $code); |
75
|
|
|
|
|
|
|
$error->line($self->line) if $self->can('line'); |
76
|
|
|
|
|
|
|
$error->document($self->document) if $self->can('document'); |
77
|
|
|
|
|
|
|
$error->arguments([@_]); |
78
|
|
|
|
|
|
|
return $error; |
79
|
|
|
|
|
|
|
}; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |