line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
39
|
|
|
39
|
|
247
|
use strict; |
|
39
|
|
|
|
|
100
|
|
|
39
|
|
|
|
|
1087
|
|
2
|
39
|
|
|
39
|
|
184
|
use warnings; |
|
39
|
|
|
|
|
70
|
|
|
39
|
|
|
|
|
3734
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::MM 1.202; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub import |
7
|
|
|
|
|
|
|
{ |
8
|
39
|
|
|
39
|
|
97
|
my $self = shift; |
9
|
|
|
|
|
|
|
|
10
|
39
|
|
|
|
|
126
|
my ($pkg) = caller(); |
11
|
39
|
|
|
|
|
127
|
my $mpkg = $pkg."::Methods"; |
12
|
39
|
|
|
|
|
106
|
foreach my $attr (@_) |
13
|
|
|
|
|
|
|
{ |
14
|
156
|
100
|
|
|
|
575
|
if ($attr =~ /^[a-z]/) |
15
|
|
|
|
|
|
|
{ |
16
|
39
|
|
|
39
|
|
287
|
no strict 'refs'; |
|
39
|
|
|
|
|
86
|
|
|
39
|
|
|
|
|
6286
|
|
17
|
78
|
|
|
|
|
132
|
*{$mpkg."::$attr"} = \&{$attr}; |
|
78
|
|
|
|
|
506
|
|
|
78
|
|
|
|
|
204
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
else |
20
|
|
|
|
|
|
|
{ |
21
|
78
|
|
|
|
|
197
|
my $get_name = $mpkg."::get$attr"; |
22
|
78
|
|
|
|
|
167
|
my $set_name = $mpkg."::set$attr"; |
23
|
|
|
|
|
|
|
my $get_sub = sub { |
24
|
5013
|
|
|
5013
|
|
12971
|
return $_[0]->{$attr}; |
25
|
78
|
|
|
|
|
255
|
}; |
26
|
|
|
|
|
|
|
my $set_sub = sub { |
27
|
1228
|
|
|
1228
|
|
2781
|
return $_[0]->{$attr} = $_[1]; |
28
|
78
|
|
|
|
|
209
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
{ |
31
|
39
|
|
|
39
|
|
316
|
no strict 'refs'; |
|
39
|
|
|
|
|
108
|
|
|
39
|
|
|
|
|
9279
|
|
|
78
|
|
|
|
|
127
|
|
32
|
78
|
|
|
|
|
336
|
*$get_name = $get_sub; |
33
|
78
|
|
|
|
|
275
|
*$set_name = $set_sub; |
34
|
78
|
|
|
|
|
124
|
push(@{$pkg."::ISA"}, $mpkg); |
|
78
|
|
|
|
|
15365
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub new |
41
|
|
|
|
|
|
|
{ |
42
|
888
|
|
|
888
|
0
|
1396
|
my $pkg = shift; |
43
|
|
|
|
|
|
|
|
44
|
888
|
|
|
|
|
1640
|
my $self = bless {}, $pkg; |
45
|
|
|
|
|
|
|
|
46
|
888
|
|
|
|
|
2461
|
$self->init(@_); |
47
|
|
|
|
|
|
|
|
48
|
888
|
|
|
|
|
1781
|
return $self; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub init |
52
|
|
|
|
|
|
|
{ |
53
|
888
|
|
|
888
|
0
|
1281
|
my $self = shift; |
54
|
|
|
|
|
|
|
|
55
|
888
|
|
|
|
|
2453
|
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__ |