| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Object::HashBase::Inline; |
|
2
|
1
|
|
|
1
|
|
279
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
24
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
35
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.006'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
19
|
BEGIN { $Object::HashBase::Test::NO_RUN = 1 } |
|
8
|
1
|
|
|
1
|
|
5
|
use Object::HashBase; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
4
|
|
|
9
|
1
|
|
|
1
|
|
228
|
use Object::HashBase::Test; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
477
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $hb_file = $INC{'Object/HashBase.pm'}; |
|
12
|
|
|
|
|
|
|
my $t_file = $INC{'Object/HashBase/Test.pm'}; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub inline { |
|
15
|
1
|
|
|
1
|
0
|
687
|
my ($prefix, $version) = @_; |
|
16
|
1
|
50
|
|
|
|
4
|
$version = $VERSION unless defined $version; |
|
17
|
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
3
|
my $path = $prefix; |
|
19
|
1
|
|
|
|
|
4
|
$path =~ s{::}{/}g; |
|
20
|
1
|
|
|
|
|
3
|
$path = "lib/$path"; |
|
21
|
1
|
|
|
|
|
2
|
my $partial = ''; |
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
5
|
for my $part (split /\//, "$path") { |
|
24
|
3
|
|
|
|
|
8
|
$partial = join '/', grep { $_ } $partial, $part; |
|
|
6
|
|
|
|
|
15
|
|
|
25
|
3
|
50
|
|
|
|
90
|
mkdir($partial) unless -d $partial; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
4
|
$path .= "/HashBase.pm"; |
|
29
|
|
|
|
|
|
|
|
|
30
|
1
|
50
|
|
|
|
28
|
mkdir('t') unless -d 't'; |
|
31
|
|
|
|
|
|
|
|
|
32
|
1
|
50
|
|
|
|
40
|
open(my $hbf, '>', $path) or die "Could not create '$path': $!"; |
|
33
|
1
|
50
|
|
|
|
29
|
open(my $tf, '>', 't/HashBase.t') or die "Could not create 't/HashBase.t': $!"; |
|
34
|
|
|
|
|
|
|
|
|
35
|
1
|
50
|
|
|
|
21
|
open(my $hin, '<', $hb_file) or die "Could not open '$hb_file': $!"; |
|
36
|
1
|
50
|
|
|
|
16
|
open(my $tin, '<', $t_file) or die "Could not open '$t_file': $!"; |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
14
|
print $hbf <<" EOT"; |
|
40
|
|
|
|
|
|
|
package $prefix\::HashBase; |
|
41
|
|
|
|
|
|
|
use strict; |
|
42
|
|
|
|
|
|
|
use warnings; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
our \$VERSION = '$version'; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
################################################################# |
|
47
|
|
|
|
|
|
|
# # |
|
48
|
|
|
|
|
|
|
# This is a generated file! Do not modify this file directly! # |
|
49
|
|
|
|
|
|
|
# Use hashbase_inc.pl script to regenerate this file. # |
|
50
|
|
|
|
|
|
|
# The script is part of the Object::HashBase distribution. # |
|
51
|
|
|
|
|
|
|
# Note: You can modify the version number above this comment # |
|
52
|
|
|
|
|
|
|
# if needed, that is fine. # |
|
53
|
|
|
|
|
|
|
# # |
|
54
|
|
|
|
|
|
|
################################################################# |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
{ |
|
57
|
|
|
|
|
|
|
no warnings 'once'; |
|
58
|
|
|
|
|
|
|
\$$prefix\::HashBase::HB_VERSION = '$Object::HashBase::VERSION'; |
|
59
|
|
|
|
|
|
|
\*$prefix\::HashBase::ATTR_SUBS = \\\%Object::HashBase::ATTR_SUBS; |
|
60
|
|
|
|
|
|
|
\*$prefix\::HashBase::ATTR_LIST = \\\%Object::HashBase::ATTR_LIST; |
|
61
|
|
|
|
|
|
|
\*$prefix\::HashBase::VERSION = \\\%Object::HashBase::VERSION; |
|
62
|
|
|
|
|
|
|
\*$prefix\::HashBase::CAN_CACHE = \\\%Object::HashBase::CAN_CACHE; |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
EOT |
|
66
|
|
|
|
|
|
|
|
|
67
|
1
|
|
|
|
|
7
|
print $tf <<" EOT"; |
|
68
|
|
|
|
|
|
|
use strict; |
|
69
|
|
|
|
|
|
|
use warnings; |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use Test::More; |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
EOT |
|
74
|
|
|
|
|
|
|
|
|
75
|
1
|
|
|
|
|
2
|
my $writing = 0; |
|
76
|
1
|
|
|
|
|
80
|
while (my $line = <$hin>) { |
|
77
|
431
|
100
|
|
|
|
671
|
if ($line =~ m/<-- START -->/) { |
|
78
|
1
|
|
|
|
|
4
|
$writing = 1; |
|
79
|
1
|
|
|
|
|
8
|
next; |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
430
|
100
|
|
|
|
580
|
if ($line =~ m/^=head1 INCLUDING IN YOUR DIST$/) { |
|
83
|
1
|
|
|
|
|
2
|
$writing = 0; |
|
84
|
1
|
|
|
|
|
5
|
print $hbf <<" EOT"; |
|
85
|
|
|
|
|
|
|
=head1 THIS IS A BUNDLED COPY OF HASHBASE |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This is a bundled copy of L. This file was generated using |
|
88
|
|
|
|
|
|
|
the |
|
89
|
|
|
|
|
|
|
C<$0> |
|
90
|
|
|
|
|
|
|
script. |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
EOT |
|
93
|
1
|
|
|
|
|
3
|
next; |
|
94
|
|
|
|
|
|
|
} |
|
95
|
429
|
100
|
|
|
|
611
|
if ($line =~ m/^=head1 /) { |
|
96
|
11
|
|
|
|
|
15
|
$writing = 1; |
|
97
|
|
|
|
|
|
|
} |
|
98
|
|
|
|
|
|
|
|
|
99
|
429
|
100
|
|
|
|
607
|
next unless $writing; |
|
100
|
|
|
|
|
|
|
|
|
101
|
403
|
|
|
|
|
552
|
$line =~ s/\QObject::\E/$prefix\::/g; |
|
102
|
|
|
|
|
|
|
|
|
103
|
403
|
|
|
|
|
857
|
print $hbf $line; |
|
104
|
|
|
|
|
|
|
} |
|
105
|
|
|
|
|
|
|
|
|
106
|
1
|
|
|
|
|
3
|
$writing = 0; |
|
107
|
1
|
|
|
|
|
12
|
while (my $line = <$tin>) { |
|
108
|
254
|
100
|
|
|
|
476
|
if ($line =~ m/<-- START -->/) { |
|
109
|
1
|
|
|
|
|
3
|
$writing = 1; |
|
110
|
1
|
|
|
|
|
3
|
next; |
|
111
|
|
|
|
|
|
|
} |
|
112
|
|
|
|
|
|
|
|
|
113
|
253
|
100
|
|
|
|
392
|
next unless $writing; |
|
114
|
|
|
|
|
|
|
|
|
115
|
230
|
|
|
|
|
311
|
$line =~ s/\QObject::HashBase::Test::\E/main\::/g; |
|
116
|
230
|
|
|
|
|
291
|
$line =~ s/\QObject::\E/$prefix\::/g; |
|
117
|
230
|
|
|
|
|
481
|
print $tf $line; |
|
118
|
|
|
|
|
|
|
} |
|
119
|
|
|
|
|
|
|
|
|
120
|
1
|
|
|
|
|
22
|
close($hbf); |
|
121
|
1
|
|
|
|
|
26
|
close($tf); |
|
122
|
|
|
|
|
|
|
} |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
1; |