line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
40
|
|
|
40
|
|
263
|
use strict; |
|
40
|
|
|
|
|
98
|
|
|
40
|
|
|
|
|
1102
|
|
2
|
40
|
|
|
40
|
|
192
|
use warnings; |
|
40
|
|
|
|
|
71
|
|
|
40
|
|
|
|
|
3816
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::MM 1.204; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub import |
7
|
|
|
|
|
|
|
{ |
8
|
40
|
|
|
40
|
|
100
|
my $self = shift; |
9
|
|
|
|
|
|
|
|
10
|
40
|
|
|
|
|
131
|
my ($pkg) = caller(); |
11
|
40
|
|
|
|
|
121
|
my $mpkg = $pkg."::Methods"; |
12
|
40
|
|
|
|
|
127
|
foreach my $attr (@_) |
13
|
|
|
|
|
|
|
{ |
14
|
160
|
100
|
|
|
|
586
|
if ($attr =~ /^[a-z]/) |
15
|
|
|
|
|
|
|
{ |
16
|
40
|
|
|
40
|
|
293
|
no strict 'refs'; |
|
40
|
|
|
|
|
109
|
|
|
40
|
|
|
|
|
6537
|
|
17
|
80
|
|
|
|
|
129
|
*{$mpkg."::$attr"} = \&{$attr}; |
|
80
|
|
|
|
|
546
|
|
|
80
|
|
|
|
|
195
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
else |
20
|
|
|
|
|
|
|
{ |
21
|
80
|
|
|
|
|
208
|
my $get_name = $mpkg."::get$attr"; |
22
|
80
|
|
|
|
|
171
|
my $set_name = $mpkg."::set$attr"; |
23
|
|
|
|
|
|
|
my $get_sub = sub { |
24
|
5061
|
|
|
5061
|
|
13849
|
return $_[0]->{$attr}; |
25
|
80
|
|
|
|
|
285
|
}; |
26
|
|
|
|
|
|
|
my $set_sub = sub { |
27
|
1251
|
|
|
1251
|
|
2931
|
return $_[0]->{$attr} = $_[1]; |
28
|
80
|
|
|
|
|
214
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
{ |
31
|
40
|
|
|
40
|
|
316
|
no strict 'refs'; |
|
40
|
|
|
|
|
146
|
|
|
40
|
|
|
|
|
9468
|
|
|
80
|
|
|
|
|
164
|
|
32
|
80
|
|
|
|
|
381
|
*$get_name = $get_sub; |
33
|
80
|
|
|
|
|
294
|
*$set_name = $set_sub; |
34
|
80
|
|
|
|
|
135
|
push(@{$pkg."::ISA"}, $mpkg); |
|
80
|
|
|
|
|
15647
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub new |
41
|
|
|
|
|
|
|
{ |
42
|
911
|
|
|
911
|
0
|
1431
|
my $pkg = shift; |
43
|
|
|
|
|
|
|
|
44
|
911
|
|
|
|
|
1602
|
my $self = bless {}, $pkg; |
45
|
|
|
|
|
|
|
|
46
|
911
|
|
|
|
|
2504
|
$self->init(@_); |
47
|
|
|
|
|
|
|
|
48
|
911
|
|
|
|
|
1899
|
return $self; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub init |
52
|
|
|
|
|
|
|
{ |
53
|
911
|
|
|
911
|
0
|
1281
|
my $self = shift; |
54
|
|
|
|
|
|
|
|
55
|
911
|
|
|
|
|
2456
|
while (@_) |
56
|
|
|
|
|
|
|
{ |
57
|
0
|
|
0
|
|
|
|
my $name = shift || confess("No name"); |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
my $method = "set$name"; |
60
|
0
|
|
|
|
|
|
$self->$method(shift); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |