line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Accessor::Fast; |
2
|
4
|
|
|
4
|
|
2478
|
use base 'Class::Accessor'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
605
|
|
3
|
4
|
|
|
4
|
|
22
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
93
|
|
4
|
4
|
|
|
4
|
|
19
|
use B 'perlstring'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
749
|
|
5
|
|
|
|
|
|
|
$Class::Accessor::Fast::VERSION = '0.51'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub make_accessor { |
8
|
6
|
|
|
6
|
1
|
9
|
my ($class, $field) = @_; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
eval sprintf q{ |
11
|
|
|
|
|
|
|
sub { |
12
|
|
|
|
|
|
|
return $_[0]{%s} if scalar(@_) == 1; |
13
|
|
|
|
|
|
|
return $_[0]{%s} = scalar(@_) == 2 ? $_[1] : [@_[1..$#_]]; |
14
|
|
|
|
|
|
|
} |
15
|
6
|
50
|
|
2
|
|
12
|
}, map { perlstring($_) } $field, $field; |
|
12
|
0
|
|
|
|
621
|
|
|
2
|
0
|
|
|
|
474
|
|
|
0
|
0
|
|
|
|
0
|
|
|
0
|
100
|
|
|
|
0
|
|
|
0
|
100
|
|
|
|
0
|
|
|
6
|
100
|
|
|
|
1128
|
|
|
2
|
50
|
|
|
|
11
|
|
|
2
|
100
|
|
|
|
22
|
|
|
1
|
50
|
|
|
|
4
|
|
|
2
|
0
|
|
|
|
8
|
|
|
1
|
0
|
|
|
|
5
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub make_ro_accessor { |
19
|
7
|
|
|
7
|
1
|
16
|
my($class, $field) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
eval sprintf q{ |
22
|
|
|
|
|
|
|
sub { |
23
|
|
|
|
|
|
|
return $_[0]{%s} if @_ == 1; |
24
|
|
|
|
|
|
|
my $caller = caller; |
25
|
|
|
|
|
|
|
$_[0]->_croak(sprintf "'$caller' cannot alter the value of '%%s' on objects of class '%%s'", %s, %s); |
26
|
|
|
|
|
|
|
} |
27
|
7
|
100
|
|
7
|
|
12
|
}, map { perlstring($_) } $field, $field, $class; |
|
21
|
0
|
|
|
|
698
|
|
|
7
|
|
|
|
|
107
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub make_wo_accessor { |
31
|
7
|
|
|
7
|
1
|
15
|
my($class, $field) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
eval sprintf q{ |
34
|
|
|
|
|
|
|
sub { |
35
|
|
|
|
|
|
|
if (@_ == 1) { |
36
|
|
|
|
|
|
|
my $caller = caller; |
37
|
|
|
|
|
|
|
$_[0]->_croak(sprintf "'$caller' cannot access the value of '%%s' on objects of class '%%s'", %s, %s); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else { |
40
|
|
|
|
|
|
|
return $_[0]{%s} = $_[1] if @_ == 2; |
41
|
|
|
|
|
|
|
return (shift)->{%s} = \@_; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
7
|
50
|
|
4
|
|
13
|
}, map { perlstring($_) } $field, $class, $field, $field; |
|
28
|
100
|
|
|
|
875
|
|
|
4
|
100
|
|
|
|
1695
|
|
|
2
|
50
|
|
|
|
5
|
|
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
9
|
|
|
0
|
|
|
|
|
0
|
|
|
2
|
|
|
|
|
10
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
2
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
3
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |