line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Accessor::Fast; |
2
|
4
|
|
|
4
|
|
2322
|
use base 'Class::Accessor'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
601
|
|
3
|
4
|
|
|
4
|
|
21
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
74
|
|
4
|
4
|
|
|
4
|
|
17
|
use B 'perlstring'; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
762
|
|
5
|
|
|
|
|
|
|
$Class::Accessor::Fast::VERSION = $Class::Accessor::VERSION; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub make_accessor { |
8
|
6
|
|
|
6
|
1
|
11
|
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
|
|
10
|
}, map { perlstring($_) } $field, $field; |
|
12
|
0
|
|
|
|
563
|
|
|
2
|
100
|
|
|
|
483
|
|
|
0
|
100
|
|
|
|
0
|
|
|
6
|
0
|
|
|
|
1006
|
|
|
2
|
0
|
|
|
|
11
|
|
|
0
|
100
|
|
|
|
0
|
|
|
0
|
50
|
|
|
|
0
|
|
|
2
|
100
|
|
|
|
22
|
|
|
1
|
50
|
|
|
|
3
|
|
|
2
|
0
|
|
|
|
8
|
|
|
1
|
0
|
|
|
|
4
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub make_ro_accessor { |
19
|
7
|
|
|
7
|
1
|
11
|
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
|
|
3
|
|
14
|
}, map { perlstring($_) } $field, $field, $class; |
|
21
|
100
|
|
|
|
704
|
|
|
3
|
|
|
|
|
59
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
46
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub make_wo_accessor { |
31
|
7
|
|
|
7
|
1
|
14
|
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
|
100
|
|
3
|
|
12
|
}, map { perlstring($_) } $field, $class, $field, $field; |
|
28
|
100
|
|
|
|
854
|
|
|
3
|
50
|
|
|
|
676
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
928
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
10
|
|
|
0
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |