| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
2
|
|
|
2
|
|
1048
|
use 5.008; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
76
|
|
|
2
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
49
|
|
|
3
|
2
|
|
|
2
|
|
8
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
90
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Class::Scaffold::Accessor; |
|
6
|
|
|
|
|
|
|
BEGIN { |
|
7
|
2
|
|
|
2
|
|
39
|
$Class::Scaffold::Accessor::VERSION = '1.102280'; |
|
8
|
|
|
|
|
|
|
} |
|
9
|
|
|
|
|
|
|
# ABSTRACT: Construct framework-specific accessors |
|
10
|
2
|
|
|
2
|
|
16
|
use Error::Hierarchy::Util 'assert_read_only'; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
95
|
|
|
11
|
2
|
|
|
2
|
|
10
|
use Class::Scaffold::Factory::Type; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
17
|
|
|
12
|
2
|
|
|
|
|
9
|
use parent qw( |
|
13
|
|
|
|
|
|
|
Class::Accessor::Complex |
|
14
|
|
|
|
|
|
|
Class::Accessor::Constructor |
|
15
|
|
|
|
|
|
|
Class::Accessor::FactoryTyped |
|
16
|
2
|
|
|
2
|
|
15
|
); |
|
|
2
|
|
|
|
|
2
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub mk_framework_object_accessors { |
|
19
|
0
|
|
|
0
|
1
|
|
my ($self, @args) = @_; |
|
20
|
0
|
|
|
|
|
|
$self->mk_factory_typed_accessors('Class::Scaffold::Factory::Type', @args); |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub mk_framework_object_array_accessors { |
|
24
|
0
|
|
|
0
|
1
|
|
my ($self, @args) = @_; |
|
25
|
0
|
|
|
|
|
|
$self->mk_factory_typed_array_accessors('Class::Scaffold::Factory::Type', |
|
26
|
|
|
|
|
|
|
@args); |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub mk_readonly_accessors { |
|
30
|
0
|
|
|
0
|
1
|
|
my ($self, @fields) = @_; |
|
31
|
0
|
|
0
|
|
|
|
my $class = ref $self || $self; |
|
32
|
0
|
|
|
|
|
|
for my $field (@fields) { |
|
33
|
2
|
|
|
2
|
|
29757
|
no strict 'refs'; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
501
|
|
|
34
|
0
|
|
|
|
|
|
*{"${class}::${field}"} = sub { |
|
35
|
0
|
0
|
0
|
0
|
|
|
local $DB::sub = local *__ANON__ = "${class}::${field}" |
|
36
|
|
|
|
|
|
|
if defined &DB::DB && !$Devel::DProf::VERSION; |
|
37
|
0
|
|
|
|
|
|
my $self = shift; |
|
38
|
0
|
|
|
|
|
|
assert_read_only(@_); |
|
39
|
0
|
|
|
|
|
|
$self->{$field}; |
|
40
|
0
|
|
|
|
|
|
}; |
|
41
|
0
|
|
|
|
|
|
*{"${class}::set_${field}"} = *{"${class}::${field}_set"} = sub { |
|
|
0
|
|
|
|
|
|
|
|
42
|
0
|
0
|
0
|
0
|
|
|
local $DB::sub = local *__ANON__ = "${class}::${field}_set" |
|
43
|
|
|
|
|
|
|
if defined &DB::DB && !$Devel::DProf::VERSION; |
|
44
|
0
|
|
|
|
|
|
$_[0]->{$field} = $_[1]; |
|
45
|
0
|
|
|
|
|
|
}; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
0
|
|
|
|
|
|
$self; # for chaining |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
1; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |