line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Class; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
3
|
|
|
|
|
|
|
|
4
|
380
|
|
|
380
|
|
426050
|
use strict; |
|
380
|
|
|
|
|
950
|
|
|
380
|
|
|
|
|
11760
|
|
5
|
380
|
|
|
380
|
|
4445
|
use warnings; |
|
380
|
|
|
|
|
2257
|
|
|
380
|
|
|
|
|
10746
|
|
6
|
|
|
|
|
|
|
|
7
|
380
|
|
|
380
|
|
5388
|
use Class::MOP; |
|
380
|
|
|
|
|
4207
|
|
|
380
|
|
|
|
|
9731
|
|
8
|
380
|
|
|
380
|
|
3564
|
use Data::OptList; |
|
380
|
|
|
|
|
915
|
|
|
380
|
|
|
|
|
4641
|
|
9
|
380
|
|
|
380
|
|
18847
|
use List::Util 1.33 qw( any ); |
|
380
|
|
|
|
|
7843
|
|
|
380
|
|
|
|
|
24700
|
|
10
|
380
|
|
|
380
|
|
3014
|
use Scalar::Util 'blessed'; |
|
380
|
|
|
|
|
1119
|
|
|
380
|
|
|
|
|
20295
|
|
11
|
|
|
|
|
|
|
|
12
|
380
|
|
|
380
|
|
184836
|
use Moose::Meta::Method::Overridden; |
|
380
|
|
|
|
|
1066
|
|
|
380
|
|
|
|
|
14227
|
|
13
|
380
|
|
|
380
|
|
179803
|
use Moose::Meta::Method::Augmented; |
|
380
|
|
|
|
|
2342
|
|
|
380
|
|
|
|
|
16566
|
|
14
|
380
|
|
|
380
|
|
179901
|
use Moose::Meta::Class::Immutable::Trait; |
|
380
|
|
|
|
|
1015
|
|
|
380
|
|
|
|
|
14552
|
|
15
|
380
|
|
|
380
|
|
173025
|
use Moose::Meta::Method::Constructor; |
|
380
|
|
|
|
|
1051
|
|
|
380
|
|
|
|
|
19759
|
|
16
|
380
|
|
|
380
|
|
180300
|
use Moose::Meta::Method::Destructor; |
|
380
|
|
|
|
|
2241
|
|
|
380
|
|
|
|
|
14291
|
|
17
|
380
|
|
|
380
|
|
168211
|
use Moose::Meta::Method::Meta; |
|
380
|
|
|
|
|
1050
|
|
|
380
|
|
|
|
|
14008
|
|
18
|
380
|
|
|
380
|
|
2454
|
use Moose::Util 'throw_exception'; |
|
380
|
|
|
|
|
2098
|
|
|
380
|
|
|
|
|
2221
|
|
19
|
380
|
|
|
380
|
|
89495
|
use Class::MOP::MiniTrait; |
|
380
|
|
|
|
|
2079
|
|
|
380
|
|
|
|
|
10885
|
|
20
|
|
|
|
|
|
|
|
21
|
380
|
|
|
380
|
|
1948
|
use parent 'Class::MOP::Class'; |
|
380
|
|
|
|
|
808
|
|
|
380
|
|
|
|
|
1666
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Class::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait'); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__PACKAGE__->meta->add_attribute('roles' => ( |
26
|
|
|
|
|
|
|
reader => 'roles', |
27
|
|
|
|
|
|
|
default => sub { [] }, |
28
|
|
|
|
|
|
|
Class::MOP::_definition_context(), |
29
|
|
|
|
|
|
|
)); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__PACKAGE__->meta->add_attribute('role_applications' => ( |
32
|
|
|
|
|
|
|
reader => '_get_role_applications', |
33
|
|
|
|
|
|
|
default => sub { [] }, |
34
|
|
|
|
|
|
|
Class::MOP::_definition_context(), |
35
|
|
|
|
|
|
|
)); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__PACKAGE__->meta->add_attribute( |
38
|
|
|
|
|
|
|
Class::MOP::Attribute->new('immutable_trait' => ( |
39
|
|
|
|
|
|
|
accessor => "immutable_trait", |
40
|
|
|
|
|
|
|
default => 'Moose::Meta::Class::Immutable::Trait', |
41
|
|
|
|
|
|
|
Class::MOP::_definition_context(), |
42
|
|
|
|
|
|
|
)) |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__PACKAGE__->meta->add_attribute('constructor_class' => ( |
46
|
|
|
|
|
|
|
accessor => 'constructor_class', |
47
|
|
|
|
|
|
|
default => 'Moose::Meta::Method::Constructor', |
48
|
|
|
|
|
|
|
Class::MOP::_definition_context(), |
49
|
|
|
|
|
|
|
)); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__PACKAGE__->meta->add_attribute('destructor_class' => ( |
52
|
|
|
|
|
|
|
accessor => 'destructor_class', |
53
|
|
|
|
|
|
|
default => 'Moose::Meta::Method::Destructor', |
54
|
|
|
|
|
|
|
Class::MOP::_definition_context(), |
55
|
|
|
|
|
|
|
)); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub initialize { |
58
|
2713
|
|
|
2713
|
1
|
9238
|
my $class = shift; |
59
|
2713
|
|
|
|
|
7933
|
my @args = @_; |
60
|
2713
|
50
|
|
|
|
12322
|
unshift @args, 'package' if @args % 2; |
61
|
2713
|
|
|
|
|
8917
|
my %opts = @args; |
62
|
2713
|
|
|
|
|
6762
|
my $package = delete $opts{package}; |
63
|
2713
|
|
100
|
|
|
8268
|
return Class::MOP::get_metaclass_by_name($package) |
64
|
|
|
|
|
|
|
|| $class->SUPER::initialize($package, |
65
|
|
|
|
|
|
|
'attribute_metaclass' => 'Moose::Meta::Attribute', |
66
|
|
|
|
|
|
|
'method_metaclass' => 'Moose::Meta::Method', |
67
|
|
|
|
|
|
|
'instance_metaclass' => 'Moose::Meta::Instance', |
68
|
|
|
|
|
|
|
%opts, |
69
|
|
|
|
|
|
|
); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub create { |
73
|
696
|
|
|
696
|
1
|
28780
|
my $class = shift; |
74
|
696
|
|
|
|
|
2329
|
my @args = @_; |
75
|
|
|
|
|
|
|
|
76
|
696
|
100
|
|
|
|
3498
|
unshift @args, 'package' if @args % 2 == 1; |
77
|
696
|
|
|
|
|
2921
|
my %options = @args; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
(ref $options{roles} eq 'ARRAY') |
80
|
|
|
|
|
|
|
|| throw_exception( RolesInCreateTakesAnArrayRef => params => \%options ) |
81
|
696
|
100
|
66
|
|
|
3437
|
if exists $options{roles}; |
82
|
|
|
|
|
|
|
|
83
|
694
|
|
|
|
|
1789
|
my $package = delete $options{package}; |
84
|
694
|
|
|
|
|
1463
|
my $roles = delete $options{roles}; |
85
|
|
|
|
|
|
|
|
86
|
694
|
|
|
|
|
4157
|
my $new_meta = $class->SUPER::create($package, %options); |
87
|
|
|
|
|
|
|
|
88
|
692
|
100
|
|
|
|
2517
|
if ($roles) { |
89
|
572
|
|
|
|
|
2307
|
Moose::Util::apply_all_roles( $new_meta, @$roles ); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
689
|
|
|
|
|
4095
|
return $new_meta; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
2599
|
|
|
2599
|
|
20269
|
sub _meta_method_class { 'Moose::Meta::Method::Meta' } |
96
|
|
|
|
|
|
|
|
97
|
823
|
|
|
823
|
|
3295
|
sub _anon_package_prefix { 'Moose::Meta::Class::__ANON__::SERIAL::' } |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub _anon_cache_key { |
100
|
2717
|
|
|
2717
|
|
4948
|
my $class = shift; |
101
|
2717
|
|
|
|
|
7374
|
my %options = @_; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
my $superclass_key = join('|', |
104
|
2717
|
|
50
|
|
|
4801
|
map { $_->[0] } @{ Data::OptList::mkopt($options{superclasses} || []) } |
|
4781
|
|
|
|
|
111170
|
|
|
2717
|
|
|
|
|
11047
|
|
105
|
|
|
|
|
|
|
); |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
my $roles = Data::OptList::mkopt(($options{roles} || []), { |
108
|
|
|
|
|
|
|
moniker => 'role', |
109
|
|
|
|
|
|
|
name_test => sub { |
110
|
19
|
100
|
66
|
19
|
|
715
|
! ref $_[0] or blessed($_[0]) && $_[0]->isa('Moose::Meta::Role') |
111
|
|
|
|
|
|
|
}, |
112
|
2717
|
|
100
|
|
|
19915
|
}); |
113
|
|
|
|
|
|
|
|
114
|
2717
|
|
|
|
|
84837
|
my @role_keys; |
115
|
2717
|
|
|
|
|
6496
|
for my $role_spec (@$roles) { |
116
|
2726
|
|
|
|
|
5787
|
my ($role, $params) = @$role_spec; |
117
|
2726
|
100
|
|
|
|
6057
|
$params = { %$params } if $params; |
118
|
|
|
|
|
|
|
|
119
|
2726
|
100
|
|
|
|
8389
|
my $key = blessed($role) ? $role->name : $role; |
120
|
|
|
|
|
|
|
|
121
|
2726
|
100
|
66
|
|
|
7067
|
if ($params && %$params) { |
122
|
|
|
|
|
|
|
my $alias = delete $params->{'-alias'} |
123
|
5
|
|
0
|
|
|
22
|
|| delete $params->{'alias'} |
124
|
|
|
|
|
|
|
|| {}; |
125
|
|
|
|
|
|
|
my $excludes = delete $params->{'-excludes'} |
126
|
5
|
|
50
|
|
|
39
|
|| delete $params->{'excludes'} |
127
|
|
|
|
|
|
|
|| []; |
128
|
5
|
100
|
|
|
|
24
|
$excludes = [$excludes] unless ref($excludes) eq 'ARRAY'; |
129
|
|
|
|
|
|
|
|
130
|
5
|
50
|
|
|
|
18
|
if (%$params) { |
131
|
0
|
|
|
|
|
0
|
warn "Roles with parameters cannot be cached. Consider " |
132
|
|
|
|
|
|
|
. "applying the parameters before calling " |
133
|
|
|
|
|
|
|
. "create_anon_class, or using 'weaken => 0' instead"; |
134
|
0
|
|
|
|
|
0
|
return; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
my $alias_key = join('%', |
138
|
5
|
|
|
|
|
25
|
map { $_ => $alias->{$_} } sort keys %$alias |
|
5
|
|
|
|
|
27
|
|
139
|
|
|
|
|
|
|
); |
140
|
5
|
|
|
|
|
18
|
my $excludes_key = join('%', |
141
|
|
|
|
|
|
|
sort @$excludes |
142
|
|
|
|
|
|
|
); |
143
|
5
|
|
|
|
|
28
|
$key .= '<' . join('+', 'a', $alias_key, 'e', $excludes_key) . '>'; |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
2726
|
|
|
|
|
6220
|
push @role_keys, $key; |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
|
149
|
2717
|
|
|
|
|
8041
|
my $role_key = join('|', sort @role_keys); |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
# Makes something like Super::Class|Super::Class::2=Role|Role::1 |
152
|
2717
|
|
|
|
|
11755
|
return join('=', $superclass_key, $role_key); |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
sub reinitialize { |
156
|
105
|
|
|
105
|
1
|
2744
|
my $self = shift; |
157
|
105
|
|
|
|
|
210
|
my $pkg = shift; |
158
|
|
|
|
|
|
|
|
159
|
105
|
100
|
|
|
|
492
|
my $meta = blessed $pkg ? $pkg : Class::MOP::class_of($pkg); |
160
|
|
|
|
|
|
|
|
161
|
105
|
|
|
|
|
256
|
my %existing_classes; |
162
|
105
|
50
|
|
|
|
337
|
if ($meta) { |
163
|
105
|
|
|
|
|
679
|
%existing_classes = map { $_ => $meta->$_() } qw( |
|
630
|
|
|
|
|
7541
|
|
164
|
|
|
|
|
|
|
attribute_metaclass |
165
|
|
|
|
|
|
|
method_metaclass |
166
|
|
|
|
|
|
|
wrapped_method_metaclass |
167
|
|
|
|
|
|
|
instance_metaclass |
168
|
|
|
|
|
|
|
constructor_class |
169
|
|
|
|
|
|
|
destructor_class |
170
|
|
|
|
|
|
|
); |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
|
173
|
105
|
|
|
|
|
1010
|
return $self->SUPER::reinitialize( |
174
|
|
|
|
|
|
|
$pkg, |
175
|
|
|
|
|
|
|
%existing_classes, |
176
|
|
|
|
|
|
|
@_, |
177
|
|
|
|
|
|
|
); |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
sub add_role { |
181
|
1094
|
|
|
1094
|
1
|
3748
|
my ($self, $role) = @_; |
182
|
1094
|
100
|
100
|
|
|
11446
|
(blessed($role) && $role->isa('Moose::Meta::Role')) |
183
|
|
|
|
|
|
|
|| throw_exception( AddRoleTakesAMooseMetaRoleInstance => role_to_be_added => $role, |
184
|
|
|
|
|
|
|
class_name => $self->name, |
185
|
|
|
|
|
|
|
); |
186
|
1091
|
|
|
|
|
3667
|
push @{$self->roles} => $role; |
|
1091
|
|
|
|
|
30162
|
|
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
sub role_applications { |
190
|
9
|
|
|
9
|
1
|
21
|
my ($self) = @_; |
191
|
|
|
|
|
|
|
|
192
|
9
|
|
|
|
|
18
|
return @{$self->_get_role_applications}; |
|
9
|
|
|
|
|
329
|
|
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
sub add_role_application { |
196
|
1091
|
|
|
1091
|
1
|
3156
|
my ($self, $application) = @_; |
197
|
|
|
|
|
|
|
|
198
|
1091
|
100
|
66
|
|
|
11513
|
(blessed($application) && $application->isa('Moose::Meta::Role::Application::ToClass')) |
199
|
|
|
|
|
|
|
|| throw_exception( InvalidRoleApplication => class_name => $self->name, |
200
|
|
|
|
|
|
|
application => $application, |
201
|
|
|
|
|
|
|
); |
202
|
|
|
|
|
|
|
|
203
|
1090
|
|
|
|
|
3403
|
push @{$self->_get_role_applications} => $application; |
|
1090
|
|
|
|
|
38904
|
|
204
|
|
|
|
|
|
|
} |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
sub calculate_all_roles { |
207
|
352
|
|
|
352
|
1
|
767
|
my $self = shift; |
208
|
352
|
|
|
|
|
638
|
my %seen; |
209
|
352
|
|
|
|
|
611
|
grep { !$seen{$_->name}++ } map { $_->calculate_all_roles } @{ $self->roles }; |
|
541
|
|
|
|
|
2668
|
|
|
335
|
|
|
|
|
1822
|
|
|
352
|
|
|
|
|
10560
|
|
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
sub _roles_with_inheritance { |
213
|
122
|
|
|
122
|
|
211
|
my $self = shift; |
214
|
122
|
|
|
|
|
199
|
my %seen; |
215
|
131
|
|
|
|
|
866
|
grep { !$seen{$_->name}++ } |
216
|
122
|
|
|
|
|
322
|
map { Class::MOP::class_of($_)->can('roles') |
217
|
1187
|
100
|
|
|
|
2085
|
? @{ Class::MOP::class_of($_)->roles } |
|
131
|
|
|
|
|
282
|
|
218
|
|
|
|
|
|
|
: () } |
219
|
|
|
|
|
|
|
$self->linearized_isa; |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
sub calculate_all_roles_with_inheritance { |
223
|
22
|
|
|
22
|
1
|
49
|
my $self = shift; |
224
|
22
|
|
|
|
|
39
|
my %seen; |
225
|
33
|
|
|
|
|
259
|
grep { !$seen{$_->name}++ } |
226
|
22
|
100
|
|
|
|
72
|
map { Class::MOP::class_of($_)->can('calculate_all_roles') |
|
189
|
|
|
|
|
399
|
|
227
|
|
|
|
|
|
|
? Class::MOP::class_of($_)->calculate_all_roles |
228
|
|
|
|
|
|
|
: () } |
229
|
|
|
|
|
|
|
$self->linearized_isa; |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
sub does_role { |
233
|
487
|
|
|
487
|
1
|
2132
|
my ($self, $role_name) = @_; |
234
|
|
|
|
|
|
|
|
235
|
487
|
100
|
|
|
|
1173
|
(defined $role_name) |
236
|
|
|
|
|
|
|
|| throw_exception( RoleNameRequired => class_name => $self->name ); |
237
|
|
|
|
|
|
|
|
238
|
485
|
|
|
|
|
1507
|
foreach my $class ($self->class_precedence_list) { |
239
|
943
|
|
|
|
|
2422
|
my $meta = Class::MOP::class_of($class); |
240
|
|
|
|
|
|
|
# when a Moose metaclass is itself extended with a role, |
241
|
|
|
|
|
|
|
# this check needs to be done since some items in the |
242
|
|
|
|
|
|
|
# class_precedence_list might in fact be Class::MOP |
243
|
|
|
|
|
|
|
# based still. |
244
|
943
|
100
|
66
|
|
|
4661
|
next unless $meta && $meta->can('roles'); |
245
|
665
|
|
|
|
|
1155
|
foreach my $role (@{$meta->roles}) { |
|
665
|
|
|
|
|
20012
|
|
246
|
458
|
100
|
|
|
|
1855
|
return 1 if $role->does_role($role_name); |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
} |
249
|
127
|
|
|
|
|
719
|
return 0; |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
sub excludes_role { |
253
|
1121
|
|
|
1121
|
1
|
3267
|
my ($self, $role_name) = @_; |
254
|
|
|
|
|
|
|
|
255
|
1121
|
100
|
|
|
|
3514
|
(defined $role_name) |
256
|
|
|
|
|
|
|
|| throw_exception( RoleNameRequired => class_name => $self->name ); |
257
|
|
|
|
|
|
|
|
258
|
1120
|
|
|
|
|
5760
|
foreach my $class ($self->class_precedence_list) { |
259
|
10411
|
|
|
|
|
21233
|
my $meta = Class::MOP::class_of($class); |
260
|
|
|
|
|
|
|
# when a Moose metaclass is itself extended with a role, |
261
|
|
|
|
|
|
|
# this check needs to be done since some items in the |
262
|
|
|
|
|
|
|
# class_precedence_list might in fact be Class::MOP |
263
|
|
|
|
|
|
|
# based still. |
264
|
10411
|
100
|
66
|
|
|
44263
|
next unless $meta && $meta->can('roles'); |
265
|
2178
|
|
|
|
|
4146
|
foreach my $role (@{$meta->roles}) { |
|
2178
|
|
|
|
|
62499
|
|
266
|
116
|
100
|
|
|
|
640
|
return 1 if $role->excludes_role($role_name); |
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
} |
269
|
1114
|
|
|
|
|
6391
|
return 0; |
270
|
|
|
|
|
|
|
} |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
sub new_object { |
273
|
3750
|
|
|
3750
|
1
|
6855
|
my $self = shift; |
274
|
3750
|
100
|
|
|
|
8993
|
my $params = @_ == 1 ? $_[0] : {@_}; |
275
|
3750
|
|
|
|
|
13981
|
my $object = $self->SUPER::new_object($params); |
276
|
|
|
|
|
|
|
|
277
|
2758
|
|
|
|
|
8950
|
$self->_call_all_triggers($object, $params); |
278
|
|
|
|
|
|
|
|
279
|
2758
|
100
|
|
|
|
21312
|
$object->BUILDALL($params) if $object->can('BUILDALL'); |
280
|
|
|
|
|
|
|
|
281
|
2749
|
|
|
|
|
17250
|
return $object; |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
sub _call_all_triggers { |
285
|
2837
|
|
|
2837
|
|
6438
|
my ($self, $object, $params) = @_; |
286
|
|
|
|
|
|
|
|
287
|
2837
|
|
|
|
|
6901
|
foreach my $attr ( $self->get_all_attributes() ) { |
288
|
|
|
|
|
|
|
|
289
|
12749
|
100
|
100
|
|
|
180494
|
next unless $attr->can('has_trigger') && $attr->has_trigger; |
290
|
|
|
|
|
|
|
|
291
|
51
|
|
|
|
|
220
|
my $init_arg = $attr->init_arg; |
292
|
51
|
50
|
|
|
|
207
|
next unless defined $init_arg; |
293
|
51
|
100
|
|
|
|
168
|
next unless exists $params->{$init_arg}; |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
$attr->trigger->( |
296
|
|
|
|
|
|
|
$object, |
297
|
|
|
|
|
|
|
( |
298
|
|
|
|
|
|
|
$attr->should_coerce |
299
|
|
|
|
|
|
|
? $attr->get_read_method_ref->($object) |
300
|
18
|
100
|
|
|
|
605
|
: $params->{$init_arg} |
301
|
|
|
|
|
|
|
), |
302
|
|
|
|
|
|
|
); |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
sub _generate_fallback_constructor { |
307
|
745
|
|
|
745
|
|
1674
|
my $self = shift; |
308
|
745
|
|
|
|
|
1851
|
my ($class) = @_; |
309
|
745
|
|
|
|
|
6798
|
return $class . '->Moose::Object::new(@_)' |
310
|
|
|
|
|
|
|
} |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
sub _inline_params { |
313
|
745
|
|
|
745
|
|
1739
|
my $self = shift; |
314
|
745
|
|
|
|
|
2102
|
my ($params, $class) = @_; |
315
|
|
|
|
|
|
|
return ( |
316
|
745
|
|
|
|
|
3447
|
'my ' . $params . ' = ', |
317
|
|
|
|
|
|
|
$self->_inline_BUILDARGS($class, '@_'), |
318
|
|
|
|
|
|
|
';', |
319
|
|
|
|
|
|
|
); |
320
|
|
|
|
|
|
|
} |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
sub _inline_BUILDARGS { |
323
|
745
|
|
|
745
|
|
1985
|
my $self = shift; |
324
|
745
|
|
|
|
|
1947
|
my ($class, $args) = @_; |
325
|
|
|
|
|
|
|
|
326
|
745
|
|
|
|
|
2860
|
my $buildargs = $self->find_method_by_name("BUILDARGS"); |
327
|
|
|
|
|
|
|
|
328
|
745
|
100
|
100
|
|
|
5508
|
if ($args eq '@_' |
|
|
|
66
|
|
|
|
|
329
|
|
|
|
|
|
|
&& (!$buildargs or $buildargs->body == \&Moose::Object::BUILDARGS)) { |
330
|
|
|
|
|
|
|
return ( |
331
|
743
|
|
|
|
|
4326
|
'do {', |
332
|
|
|
|
|
|
|
'my $params;', |
333
|
|
|
|
|
|
|
'if (scalar @_ == 1) {', |
334
|
|
|
|
|
|
|
'if (!defined($_[0]) || ref($_[0]) ne \'HASH\') {', |
335
|
|
|
|
|
|
|
$self->_inline_throw_exception( |
336
|
|
|
|
|
|
|
'SingleParamsToNewMustBeHashRef' |
337
|
|
|
|
|
|
|
) . ';', |
338
|
|
|
|
|
|
|
'}', |
339
|
|
|
|
|
|
|
'$params = { %{ $_[0] } };', |
340
|
|
|
|
|
|
|
'}', |
341
|
|
|
|
|
|
|
'elsif (@_ % 2) {', |
342
|
|
|
|
|
|
|
'Carp::carp(', |
343
|
|
|
|
|
|
|
'"The new() method for ' . $class . ' expects a ' |
344
|
|
|
|
|
|
|
. 'hash reference or a key/value list. You passed an ' |
345
|
|
|
|
|
|
|
. 'odd number of arguments"', |
346
|
|
|
|
|
|
|
');', |
347
|
|
|
|
|
|
|
'$params = {@_, undef};', |
348
|
|
|
|
|
|
|
'}', |
349
|
|
|
|
|
|
|
'else {', |
350
|
|
|
|
|
|
|
'$params = {@_};', |
351
|
|
|
|
|
|
|
'}', |
352
|
|
|
|
|
|
|
'$params;', |
353
|
|
|
|
|
|
|
'}', |
354
|
|
|
|
|
|
|
); |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
else { |
357
|
2
|
|
|
|
|
16
|
return $class . '->BUILDARGS(' . $args . ')'; |
358
|
|
|
|
|
|
|
} |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
sub _inline_slot_initializer { |
362
|
2489
|
|
|
2489
|
|
4442
|
my $self = shift; |
363
|
2489
|
|
|
|
|
5017
|
my ($attr, $idx) = @_; |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
return ( |
366
|
2489
|
|
|
|
|
11220
|
'## ' . $attr->name, |
367
|
|
|
|
|
|
|
$self->_inline_check_required_attr($attr), |
368
|
|
|
|
|
|
|
$self->SUPER::_inline_slot_initializer(@_), |
369
|
|
|
|
|
|
|
); |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
sub _inline_check_required_attr { |
373
|
2488
|
|
|
2488
|
|
4757
|
my $self = shift; |
374
|
2488
|
|
|
|
|
4534
|
my ($attr) = @_; |
375
|
|
|
|
|
|
|
|
376
|
2488
|
100
|
|
|
|
10185
|
return unless defined $attr->init_arg; |
377
|
2479
|
100
|
100
|
|
|
98924
|
return unless $attr->can('is_required') && $attr->is_required; |
378
|
933
|
100
|
100
|
|
|
4081
|
return if $attr->has_default || $attr->has_builder; |
379
|
|
|
|
|
|
|
|
380
|
920
|
|
|
|
|
8340
|
my $throw = $self->_inline_throw_exception( |
381
|
|
|
|
|
|
|
'AttributeIsRequired', |
382
|
|
|
|
|
|
|
sprintf( |
383
|
|
|
|
|
|
|
<<'EOF', quotemeta( $attr->name ), quotemeta( $attr->init_arg ) ), ); |
384
|
|
|
|
|
|
|
params => $params, |
385
|
|
|
|
|
|
|
class_name => $class_name, |
386
|
|
|
|
|
|
|
attribute_name => "%s", |
387
|
|
|
|
|
|
|
attribute_init_arg => "%s", |
388
|
|
|
|
|
|
|
EOF |
389
|
|
|
|
|
|
|
|
390
|
920
|
|
|
|
|
9118
|
return sprintf( <<'EOF', quotemeta( $attr->init_arg ), $throw ) |
391
|
|
|
|
|
|
|
if ( !exists $params->{"%s"} ) { |
392
|
|
|
|
|
|
|
%s; |
393
|
|
|
|
|
|
|
} |
394
|
|
|
|
|
|
|
EOF |
395
|
|
|
|
|
|
|
} |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
# XXX: these two are duplicated from cmop, because we have to pass the tc stuff |
398
|
|
|
|
|
|
|
# through to _inline_set_value - this should probably be fixed, but i'm not |
399
|
|
|
|
|
|
|
# quite sure how. -doy |
400
|
|
|
|
|
|
|
sub _inline_init_attr_from_constructor { |
401
|
2480
|
|
|
2480
|
|
4403
|
my $self = shift; |
402
|
2480
|
|
|
|
|
5204
|
my ($attr, $idx) = @_; |
403
|
|
|
|
|
|
|
|
404
|
2480
|
|
|
|
|
16078
|
my @initial_value = $attr->_inline_set_value( |
405
|
|
|
|
|
|
|
'$instance', |
406
|
|
|
|
|
|
|
'$params->{\'' . $attr->init_arg . '\'}', |
407
|
|
|
|
|
|
|
'$type_constraint_bodies[' . $idx . ']', |
408
|
|
|
|
|
|
|
'$type_coercions[' . $idx . ']', |
409
|
|
|
|
|
|
|
'$type_constraint_messages[' . $idx . ']', |
410
|
|
|
|
|
|
|
'for constructor', |
411
|
|
|
|
|
|
|
); |
412
|
|
|
|
|
|
|
|
413
|
2480
|
100
|
|
|
|
9343
|
push @initial_value, ( |
414
|
|
|
|
|
|
|
'$attrs->[' . $idx . ']->set_initial_value(', |
415
|
|
|
|
|
|
|
'$instance,', |
416
|
|
|
|
|
|
|
$attr->_inline_instance_get('$instance'), |
417
|
|
|
|
|
|
|
');', |
418
|
|
|
|
|
|
|
) if $attr->has_initializer; |
419
|
|
|
|
|
|
|
|
420
|
2480
|
|
|
|
|
9898
|
return @initial_value; |
421
|
|
|
|
|
|
|
} |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
sub _inline_init_attr_from_default { |
424
|
2489
|
|
|
2489
|
|
4493
|
my $self = shift; |
425
|
2489
|
|
|
|
|
6036
|
my ($attr, $idx) = @_; |
426
|
|
|
|
|
|
|
|
427
|
2489
|
100
|
100
|
|
|
87528
|
return if $attr->can('is_lazy') && $attr->is_lazy; |
428
|
1218
|
|
|
|
|
6197
|
my $default = $self->_inline_default_value($attr, $idx); |
429
|
1218
|
100
|
|
|
|
5197
|
return unless $default; |
430
|
|
|
|
|
|
|
|
431
|
141
|
|
|
|
|
1117
|
my @initial_value = ( |
432
|
|
|
|
|
|
|
'my $default = ' . $default . ';', |
433
|
|
|
|
|
|
|
$attr->_inline_set_value( |
434
|
|
|
|
|
|
|
'$instance', |
435
|
|
|
|
|
|
|
'$default', |
436
|
|
|
|
|
|
|
'$type_constraint_bodies[' . $idx . ']', |
437
|
|
|
|
|
|
|
'$type_coercions[' . $idx . ']', |
438
|
|
|
|
|
|
|
'$type_constraint_messages[' . $idx . ']', |
439
|
|
|
|
|
|
|
'for constructor', |
440
|
|
|
|
|
|
|
), |
441
|
|
|
|
|
|
|
); |
442
|
|
|
|
|
|
|
|
443
|
141
|
50
|
|
|
|
792
|
push @initial_value, ( |
444
|
|
|
|
|
|
|
'$attrs->[' . $idx . ']->set_initial_value(', |
445
|
|
|
|
|
|
|
'$instance,', |
446
|
|
|
|
|
|
|
$attr->_inline_instance_get('$instance'), |
447
|
|
|
|
|
|
|
');', |
448
|
|
|
|
|
|
|
) if $attr->has_initializer; |
449
|
|
|
|
|
|
|
|
450
|
141
|
|
|
|
|
850
|
return @initial_value; |
451
|
|
|
|
|
|
|
} |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
sub _inline_extra_init { |
454
|
745
|
|
|
745
|
|
1783
|
my $self = shift; |
455
|
|
|
|
|
|
|
return ( |
456
|
745
|
|
|
|
|
3198
|
$self->_inline_triggers, |
457
|
|
|
|
|
|
|
$self->_inline_BUILDALL, |
458
|
|
|
|
|
|
|
); |
459
|
|
|
|
|
|
|
} |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
sub _inline_triggers { |
462
|
745
|
|
|
745
|
|
1516
|
my $self = shift; |
463
|
745
|
|
|
|
|
2148
|
my @trigger_calls; |
464
|
|
|
|
|
|
|
|
465
|
745
|
|
|
|
|
2776
|
my @attrs = sort { $a->name cmp $b->name } $self->get_all_attributes; |
|
3078
|
|
|
|
|
10118
|
|
466
|
745
|
|
|
|
|
4410
|
for my $i (0 .. $#attrs) { |
467
|
2489
|
|
|
|
|
4927
|
my $attr = $attrs[$i]; |
468
|
|
|
|
|
|
|
|
469
|
2489
|
100
|
100
|
|
|
92442
|
next unless $attr->can('has_trigger') && $attr->has_trigger; |
470
|
|
|
|
|
|
|
|
471
|
13
|
|
|
|
|
77
|
my $init_arg = $attr->init_arg; |
472
|
13
|
50
|
|
|
|
51
|
next unless defined $init_arg; |
473
|
|
|
|
|
|
|
|
474
|
13
|
|
|
|
|
130
|
push @trigger_calls, |
475
|
|
|
|
|
|
|
'if (exists $params->{\'' . $init_arg . '\'}) {', |
476
|
|
|
|
|
|
|
'$triggers->[' . $i . ']->(', |
477
|
|
|
|
|
|
|
'$instance,', |
478
|
|
|
|
|
|
|
$attr->_inline_instance_get('$instance') . ',', |
479
|
|
|
|
|
|
|
');', |
480
|
|
|
|
|
|
|
'}'; |
481
|
|
|
|
|
|
|
} |
482
|
|
|
|
|
|
|
|
483
|
745
|
|
|
|
|
4927
|
return @trigger_calls; |
484
|
|
|
|
|
|
|
} |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
sub _inline_BUILDALL { |
487
|
745
|
|
|
745
|
|
1764
|
my $self = shift; |
488
|
|
|
|
|
|
|
|
489
|
745
|
|
|
|
|
5729
|
my @methods = reverse $self->find_all_methods_by_name('BUILD'); |
490
|
745
|
100
|
|
|
|
3659
|
return () unless @methods; |
491
|
|
|
|
|
|
|
|
492
|
619
|
|
|
|
|
1434
|
my @BUILD_calls; |
493
|
|
|
|
|
|
|
|
494
|
619
|
|
|
|
|
1683
|
foreach my $method (@methods) { |
495
|
|
|
|
|
|
|
push @BUILD_calls, |
496
|
632
|
|
|
|
|
2850
|
'$instance->' . $method->{class} . '::BUILD($params);'; |
497
|
|
|
|
|
|
|
} |
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
return ( |
500
|
619
|
|
|
|
|
6903
|
'if (!$params->{__no_BUILD__}) {', |
501
|
|
|
|
|
|
|
@BUILD_calls, |
502
|
|
|
|
|
|
|
'}', |
503
|
|
|
|
|
|
|
); |
504
|
|
|
|
|
|
|
} |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
sub _eval_environment { |
507
|
746
|
|
|
746
|
|
1893
|
my $self = shift; |
508
|
|
|
|
|
|
|
|
509
|
746
|
|
|
|
|
3124
|
my @attrs = sort { $a->name cmp $b->name } $self->get_all_attributes; |
|
3096
|
|
|
|
|
10513
|
|
510
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
my $triggers = [ |
512
|
746
|
100
|
100
|
|
|
2724
|
map { $_->can('has_trigger') && $_->has_trigger ? $_->trigger : undef } |
|
2489
|
|
|
|
|
92312
|
|
513
|
|
|
|
|
|
|
@attrs |
514
|
|
|
|
|
|
|
]; |
515
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
# We need to check if the attribute ->can('type_constraint') |
517
|
|
|
|
|
|
|
# since we may be trying to immutabilize a Moose meta class, |
518
|
|
|
|
|
|
|
# which in turn has attributes which are Class::MOP::Attribute |
519
|
|
|
|
|
|
|
# objects, rather than Moose::Meta::Attribute. And |
520
|
|
|
|
|
|
|
# Class::MOP::Attribute attributes have no type constraints. |
521
|
|
|
|
|
|
|
# However we need to make sure we leave an undef value there |
522
|
|
|
|
|
|
|
# because the inlined code is using the index of the attributes |
523
|
|
|
|
|
|
|
# to determine where to find the type constraint |
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
my @type_constraints = map { |
526
|
746
|
100
|
|
|
|
3664
|
$_->can('type_constraint') ? $_->type_constraint : undef |
|
2489
|
|
|
|
|
77255
|
|
527
|
|
|
|
|
|
|
} @attrs; |
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
my @type_constraint_bodies = map { |
530
|
746
|
100
|
|
|
|
3618
|
defined $_ ? $_->_compiled_type_constraint : undef; |
|
2489
|
|
|
|
|
89934
|
|
531
|
|
|
|
|
|
|
} @type_constraints; |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
my @type_coercions = map { |
534
|
746
|
100
|
100
|
|
|
2421
|
defined $_ && $_->has_coercion |
|
2489
|
|
|
|
|
78547
|
|
535
|
|
|
|
|
|
|
? $_->coercion->_compiled_type_coercion |
536
|
|
|
|
|
|
|
: undef |
537
|
|
|
|
|
|
|
} @type_constraints; |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
my @type_constraint_messages = map { |
540
|
746
|
50
|
|
|
|
3292
|
defined $_ |
|
2489
|
100
|
|
|
|
77835
|
|
541
|
|
|
|
|
|
|
? ($_->has_message ? $_->message : $_->_default_message) |
542
|
|
|
|
|
|
|
: undef |
543
|
|
|
|
|
|
|
} @type_constraints; |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
return { |
546
|
746
|
|
|
|
|
4707
|
%{ $self->SUPER::_eval_environment }, |
547
|
2488
|
50
|
|
2488
|
|
8898
|
((any { defined && $_->has_initializer } @attrs) |
548
|
|
|
|
|
|
|
? ('$attrs' => \[@attrs]) |
549
|
|
|
|
|
|
|
: ()), |
550
|
|
|
|
|
|
|
'$triggers' => \$triggers, |
551
|
|
|
|
|
|
|
'@type_coercions' => \@type_coercions, |
552
|
|
|
|
|
|
|
'@type_constraint_bodies' => \@type_constraint_bodies, |
553
|
|
|
|
|
|
|
'@type_constraint_messages' => \@type_constraint_messages, |
554
|
746
|
100
|
|
|
|
2164
|
( map { defined($_) ? %{ $_->inline_environment } : () } |
|
2489
|
100
|
|
|
|
6298
|
|
|
2413
|
|
|
|
|
6879
|
|
555
|
|
|
|
|
|
|
@type_constraints ), |
556
|
|
|
|
|
|
|
# pretty sure this is only going to be closed over if you use a custom |
557
|
|
|
|
|
|
|
# error class at this point, but we should still get rid of this |
558
|
|
|
|
|
|
|
# at some point |
559
|
|
|
|
|
|
|
'$meta' => \$self, |
560
|
|
|
|
|
|
|
'$class_name' => \($self->name), |
561
|
|
|
|
|
|
|
}; |
562
|
|
|
|
|
|
|
} |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
sub superclasses { |
565
|
15344
|
|
|
15344
|
1
|
30959
|
my $self = shift; |
566
|
15344
|
|
|
|
|
51848
|
my $supers = Data::OptList::mkopt(\@_); |
567
|
15344
|
|
|
|
|
356000
|
foreach my $super (@{ $supers }) { |
|
15344
|
|
|
|
|
36305
|
|
568
|
3105
|
|
|
|
|
6683
|
my ($name, $opts) = @{ $super }; |
|
3105
|
|
|
|
|
7791
|
|
569
|
3105
|
|
|
|
|
14541
|
Moose::Util::_load_user_class($name, $opts); |
570
|
3104
|
|
|
|
|
185691
|
my $meta = Class::MOP::class_of($name); |
571
|
3104
|
100
|
100
|
|
|
31869
|
throw_exception( CanExtendOnlyClasses => role_name => $meta->name ) |
572
|
|
|
|
|
|
|
if $meta && $meta->isa('Moose::Meta::Role') |
573
|
|
|
|
|
|
|
} |
574
|
15341
|
|
|
|
|
26811
|
return $self->SUPER::superclasses(map { $_->[0] } @{ $supers }); |
|
3101
|
|
|
|
|
13737
|
|
|
15341
|
|
|
|
|
46901
|
|
575
|
|
|
|
|
|
|
} |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
### --------------------------------------------- |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
sub add_attribute { |
580
|
2354
|
|
|
2354
|
1
|
7143
|
my $self = shift; |
581
|
2354
|
100
|
66
|
|
|
17954
|
my $attr = |
582
|
|
|
|
|
|
|
(blessed $_[0] && $_[0]->isa('Class::MOP::Attribute') |
583
|
|
|
|
|
|
|
? $_[0] |
584
|
|
|
|
|
|
|
: $self->_process_attribute(@_)); |
585
|
2314
|
|
|
|
|
14642
|
$self->SUPER::add_attribute($attr); |
586
|
|
|
|
|
|
|
# it may be a Class::MOP::Attribute, theoretically, which doesn't have |
587
|
|
|
|
|
|
|
# 'bare' and doesn't implement this method |
588
|
2292
|
100
|
|
|
|
13445
|
if ($attr->can('_check_associated_methods')) { |
589
|
2289
|
|
|
|
|
7772
|
$attr->_check_associated_methods; |
590
|
|
|
|
|
|
|
} |
591
|
2292
|
|
|
|
|
14682
|
return $attr; |
592
|
|
|
|
|
|
|
} |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
sub add_override_method_modifier { |
595
|
1012
|
|
|
1012
|
1
|
2564
|
my ($self, $name, $method, $_super_package) = @_; |
596
|
|
|
|
|
|
|
|
597
|
1012
|
|
|
|
|
2857
|
my $existing_method = $self->get_method($name); |
598
|
1012
|
100
|
|
|
|
2835
|
(!$existing_method) |
599
|
|
|
|
|
|
|
|| throw_exception( CannotOverrideLocalMethodIsPresent => class_name => $self->name, |
600
|
|
|
|
|
|
|
method => $existing_method, |
601
|
|
|
|
|
|
|
); |
602
|
1010
|
|
|
|
|
5314
|
$self->add_method($name => Moose::Meta::Method::Overridden->new( |
603
|
|
|
|
|
|
|
method => $method, |
604
|
|
|
|
|
|
|
class => $self, |
605
|
|
|
|
|
|
|
package => $_super_package, # need this for roles |
606
|
|
|
|
|
|
|
name => $name, |
607
|
|
|
|
|
|
|
)); |
608
|
|
|
|
|
|
|
} |
609
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
sub add_augment_method_modifier { |
611
|
16
|
|
|
16
|
1
|
45
|
my ($self, $name, $method) = @_; |
612
|
16
|
|
|
|
|
107
|
my $existing_method = $self->get_method($name); |
613
|
16
|
100
|
|
|
|
56
|
throw_exception( CannotAugmentIfLocalMethodPresent => class_name => $self->name, |
614
|
|
|
|
|
|
|
method => $existing_method, |
615
|
|
|
|
|
|
|
) |
616
|
|
|
|
|
|
|
if( $existing_method ); |
617
|
|
|
|
|
|
|
|
618
|
14
|
|
|
|
|
92
|
$self->add_method($name => Moose::Meta::Method::Augmented->new( |
619
|
|
|
|
|
|
|
method => $method, |
620
|
|
|
|
|
|
|
class => $self, |
621
|
|
|
|
|
|
|
name => $name, |
622
|
|
|
|
|
|
|
)); |
623
|
|
|
|
|
|
|
} |
624
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
## Private Utility methods ... |
626
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
sub _find_next_method_by_name_which_is_not_overridden { |
628
|
1
|
|
|
1
|
|
4
|
my ($self, $name) = @_; |
629
|
1
|
|
|
|
|
8
|
foreach my $method ($self->find_all_methods_by_name($name)) { |
630
|
|
|
|
|
|
|
return $method->{code} |
631
|
2
|
100
|
66
|
|
|
24
|
if blessed($method->{code}) && !$method->{code}->isa('Moose::Meta::Method::Overridden'); |
632
|
|
|
|
|
|
|
} |
633
|
0
|
|
|
|
|
0
|
return undef; |
634
|
|
|
|
|
|
|
} |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
## Metaclass compatibility |
637
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
sub _base_metaclasses { |
639
|
6112
|
|
|
6112
|
|
11221
|
my $self = shift; |
640
|
6112
|
|
|
|
|
16963
|
my %metaclasses = $self->SUPER::_base_metaclasses; |
641
|
6112
|
|
|
|
|
20984
|
for my $class (keys %metaclasses) { |
642
|
36672
|
|
|
|
|
120297
|
$metaclasses{$class} =~ s/^Class::MOP/Moose::Meta/; |
643
|
|
|
|
|
|
|
} |
644
|
|
|
|
|
|
|
return ( |
645
|
6112
|
|
|
|
|
37439
|
%metaclasses, |
646
|
|
|
|
|
|
|
); |
647
|
|
|
|
|
|
|
} |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
sub _fix_class_metaclass_incompatibility { |
650
|
38
|
|
|
38
|
|
87
|
my $self = shift; |
651
|
38
|
|
|
|
|
84
|
my ($super_meta) = @_; |
652
|
|
|
|
|
|
|
|
653
|
38
|
|
|
|
|
177
|
$self->SUPER::_fix_class_metaclass_incompatibility(@_); |
654
|
|
|
|
|
|
|
|
655
|
35
|
50
|
|
|
|
202
|
if ($self->_class_metaclass_can_be_made_compatible($super_meta)) { |
656
|
0
|
0
|
|
|
|
0
|
($self->is_pristine) |
657
|
|
|
|
|
|
|
|| throw_exception( CannotFixMetaclassCompatibility => class => $self, |
658
|
|
|
|
|
|
|
superclass => $super_meta |
659
|
|
|
|
|
|
|
); |
660
|
0
|
|
|
|
|
0
|
my $super_meta_name = $super_meta->_real_ref_name; |
661
|
0
|
|
|
|
|
0
|
my $class_meta_subclass_meta_name = Moose::Util::_reconcile_roles_for_metaclass(blessed($self), $super_meta_name); |
662
|
0
|
|
|
|
|
0
|
my $new_self = $class_meta_subclass_meta_name->reinitialize( |
663
|
|
|
|
|
|
|
$self->name, |
664
|
|
|
|
|
|
|
); |
665
|
|
|
|
|
|
|
|
666
|
0
|
|
|
|
|
0
|
$self->_replace_self( $new_self, $class_meta_subclass_meta_name ); |
667
|
|
|
|
|
|
|
} |
668
|
|
|
|
|
|
|
} |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
sub _fix_single_metaclass_incompatibility { |
671
|
124
|
|
|
124
|
|
207
|
my $self = shift; |
672
|
124
|
|
|
|
|
250
|
my ($metaclass_type, $super_meta) = @_; |
673
|
|
|
|
|
|
|
|
674
|
124
|
|
|
|
|
432
|
$self->SUPER::_fix_single_metaclass_incompatibility(@_); |
675
|
|
|
|
|
|
|
|
676
|
124
|
50
|
|
|
|
372
|
if ($self->_single_metaclass_can_be_made_compatible($super_meta, $metaclass_type)) { |
677
|
0
|
0
|
|
|
|
0
|
($self->is_pristine) |
678
|
|
|
|
|
|
|
|| throw_exception( CannotFixMetaclassCompatibility => class => $self, |
679
|
|
|
|
|
|
|
superclass => $super_meta, |
680
|
|
|
|
|
|
|
metaclass_type => $metaclass_type |
681
|
|
|
|
|
|
|
); |
682
|
0
|
|
|
|
|
0
|
my $super_meta_name = $super_meta->_real_ref_name; |
683
|
0
|
|
|
|
|
0
|
my $class_specific_meta_subclass_meta_name = Moose::Util::_reconcile_roles_for_metaclass($self->$metaclass_type, $super_meta->$metaclass_type); |
684
|
0
|
|
|
|
|
0
|
my $new_self = $super_meta->reinitialize( |
685
|
|
|
|
|
|
|
$self->name, |
686
|
|
|
|
|
|
|
$metaclass_type => $class_specific_meta_subclass_meta_name, |
687
|
|
|
|
|
|
|
); |
688
|
|
|
|
|
|
|
|
689
|
0
|
|
|
|
|
0
|
$self->_replace_self( $new_self, $super_meta_name ); |
690
|
|
|
|
|
|
|
} |
691
|
|
|
|
|
|
|
} |
692
|
|
|
|
|
|
|
|
693
|
|
|
|
|
|
|
sub _replace_self { |
694
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
695
|
0
|
|
|
|
|
0
|
my ( $new_self, $new_class) = @_; |
696
|
|
|
|
|
|
|
|
697
|
0
|
|
|
|
|
0
|
%$self = %$new_self; |
698
|
0
|
|
|
|
|
0
|
bless $self, $new_class; |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
# We need to replace the cached metaclass instance or else when it goes |
701
|
|
|
|
|
|
|
# out of scope Class::MOP::Class destroy's the namespace for the |
702
|
|
|
|
|
|
|
# metaclass's class, causing much havoc. |
703
|
0
|
|
|
|
|
0
|
my $weaken = Class::MOP::metaclass_is_weak( $self->name ); |
704
|
0
|
|
|
|
|
0
|
Class::MOP::store_metaclass_by_name( $self->name, $self ); |
705
|
0
|
0
|
|
|
|
0
|
Class::MOP::weaken_metaclass( $self->name ) if $weaken; |
706
|
|
|
|
|
|
|
} |
707
|
|
|
|
|
|
|
|
708
|
|
|
|
|
|
|
sub _process_attribute { |
709
|
1683
|
|
|
1683
|
|
6446
|
my ( $self, $name, @args ) = @_; |
710
|
|
|
|
|
|
|
|
711
|
1683
|
50
|
33
|
|
|
6348
|
@args = %{$args[0]} if scalar @args == 1 && ref($args[0]) eq 'HASH'; |
|
0
|
|
|
|
|
0
|
|
712
|
|
|
|
|
|
|
|
713
|
1683
|
100
|
100
|
|
|
7670
|
if (($name || '') =~ /^\+(.*)/) { |
714
|
40
|
|
|
|
|
178
|
return $self->_process_inherited_attribute($1, @args); |
715
|
|
|
|
|
|
|
} |
716
|
|
|
|
|
|
|
else { |
717
|
1643
|
|
|
|
|
5570
|
return $self->_process_new_attribute($name, @args); |
718
|
|
|
|
|
|
|
} |
719
|
|
|
|
|
|
|
} |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
sub _process_new_attribute { |
722
|
1643
|
|
|
1643
|
|
5452
|
my ( $self, $name, @args ) = @_; |
723
|
|
|
|
|
|
|
|
724
|
1643
|
|
|
|
|
14474
|
$self->attribute_metaclass->interpolate_class_and_new($name, @args); |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
sub _process_inherited_attribute { |
728
|
40
|
|
|
40
|
|
237
|
my ($self, $attr_name, %options) = @_; |
729
|
|
|
|
|
|
|
|
730
|
40
|
|
|
|
|
224
|
my $inherited_attr = $self->find_attribute_by_name($attr_name); |
731
|
40
|
100
|
|
|
|
214
|
(defined $inherited_attr) |
732
|
|
|
|
|
|
|
|| throw_exception( NoAttributeFoundInSuperClass => class_name => $self->name, |
733
|
|
|
|
|
|
|
attribute_name => $attr_name, |
734
|
|
|
|
|
|
|
params => \%options |
735
|
|
|
|
|
|
|
); |
736
|
36
|
50
|
|
|
|
199
|
if ($inherited_attr->isa('Moose::Meta::Attribute')) { |
737
|
36
|
|
|
|
|
212
|
return $inherited_attr->clone_and_inherit_options(%options); |
738
|
|
|
|
|
|
|
} |
739
|
|
|
|
|
|
|
else { |
740
|
|
|
|
|
|
|
# NOTE: |
741
|
|
|
|
|
|
|
# kind of a kludge to handle Class::MOP::Attributes |
742
|
0
|
|
|
|
|
0
|
return $inherited_attr->Moose::Meta::Attribute::clone_and_inherit_options(%options); |
743
|
|
|
|
|
|
|
} |
744
|
|
|
|
|
|
|
} |
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
# reinitialization support |
747
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
sub _restore_metaobjects_from { |
749
|
104
|
|
|
104
|
|
232
|
my $self = shift; |
750
|
104
|
|
|
|
|
253
|
my ($old_meta) = @_; |
751
|
|
|
|
|
|
|
|
752
|
104
|
|
|
|
|
510
|
$self->SUPER::_restore_metaobjects_from($old_meta); |
753
|
|
|
|
|
|
|
|
754
|
102
|
|
|
|
|
247
|
for my $role ( @{ $old_meta->roles } ) { |
|
102
|
|
|
|
|
3638
|
|
755
|
8
|
|
|
|
|
28
|
$self->add_role($role); |
756
|
|
|
|
|
|
|
} |
757
|
|
|
|
|
|
|
|
758
|
102
|
|
|
|
|
876
|
for my $application ( @{ $old_meta->_get_role_applications } ) { |
|
102
|
|
|
|
|
3704
|
|
759
|
8
|
|
|
|
|
272
|
$application->class($self); |
760
|
8
|
|
|
|
|
22
|
$self->add_role_application ($application); |
761
|
|
|
|
|
|
|
} |
762
|
|
|
|
|
|
|
} |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
## Immutability |
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
sub _immutable_options { |
767
|
761
|
|
|
761
|
|
2444
|
my ( $self, @args ) = @_; |
768
|
|
|
|
|
|
|
|
769
|
761
|
|
|
|
|
3874
|
$self->SUPER::_immutable_options( |
770
|
|
|
|
|
|
|
inline_destructor => 1, |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
# Moose always does this when an attribute is created |
773
|
|
|
|
|
|
|
inline_accessors => 0, |
774
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
@args, |
776
|
|
|
|
|
|
|
); |
777
|
|
|
|
|
|
|
} |
778
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
sub _fixup_attributes_after_rebless { |
780
|
83
|
|
|
83
|
|
167
|
my $self = shift; |
781
|
83
|
|
|
|
|
188
|
my ($instance, $rebless_from, %params) = @_; |
782
|
|
|
|
|
|
|
|
783
|
83
|
|
|
|
|
478
|
$self->SUPER::_fixup_attributes_after_rebless( |
784
|
|
|
|
|
|
|
$instance, |
785
|
|
|
|
|
|
|
$rebless_from, |
786
|
|
|
|
|
|
|
%params |
787
|
|
|
|
|
|
|
); |
788
|
|
|
|
|
|
|
|
789
|
79
|
|
|
|
|
447
|
$self->_call_all_triggers( $instance, \%params ); |
790
|
|
|
|
|
|
|
} |
791
|
|
|
|
|
|
|
|
792
|
|
|
|
|
|
|
## ------------------------------------------------- |
793
|
|
|
|
|
|
|
|
794
|
|
|
|
|
|
|
our $error_level; |
795
|
|
|
|
|
|
|
|
796
|
|
|
|
|
|
|
sub _inline_throw_exception { |
797
|
1663
|
|
|
1663
|
|
4665
|
my ( $self, $exception_type, $throw_args ) = @_; |
798
|
1663
|
|
100
|
|
|
18094
|
return 'die Module::Runtime::use_module("Moose::Exception::' . $exception_type . '")->new(' . ($throw_args || '') . ')'; |
799
|
|
|
|
|
|
|
} |
800
|
|
|
|
|
|
|
|
801
|
|
|
|
|
|
|
1; |
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
# ABSTRACT: The Moose metaclass |
804
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
__END__ |
806
|
|
|
|
|
|
|
|
807
|
|
|
|
|
|
|
=pod |
808
|
|
|
|
|
|
|
|
809
|
|
|
|
|
|
|
=encoding UTF-8 |
810
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
=head1 NAME |
812
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
Moose::Meta::Class - The Moose metaclass |
814
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
=head1 VERSION |
816
|
|
|
|
|
|
|
|
817
|
|
|
|
|
|
|
version 2.2206 |
818
|
|
|
|
|
|
|
|
819
|
|
|
|
|
|
|
=head1 DESCRIPTION |
820
|
|
|
|
|
|
|
|
821
|
|
|
|
|
|
|
This class is a subclass of L<Class::MOP::Class> that provides |
822
|
|
|
|
|
|
|
additional Moose-specific functionality. |
823
|
|
|
|
|
|
|
|
824
|
|
|
|
|
|
|
To really understand this class, you will need to start with the |
825
|
|
|
|
|
|
|
L<Class::MOP::Class> documentation. This class can be understood as a |
826
|
|
|
|
|
|
|
set of additional features on top of the basic feature provided by |
827
|
|
|
|
|
|
|
that parent class. |
828
|
|
|
|
|
|
|
|
829
|
|
|
|
|
|
|
=head1 INHERITANCE |
830
|
|
|
|
|
|
|
|
831
|
|
|
|
|
|
|
C<Moose::Meta::Class> is a subclass of L<Class::MOP::Class>. |
832
|
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
=head1 METHODS |
834
|
|
|
|
|
|
|
|
835
|
|
|
|
|
|
|
=over 4 |
836
|
|
|
|
|
|
|
|
837
|
|
|
|
|
|
|
=item B<< Moose::Meta::Class->initialize($package_name, %options) >> |
838
|
|
|
|
|
|
|
|
839
|
|
|
|
|
|
|
This overrides the parent's method in order to provide its own |
840
|
|
|
|
|
|
|
defaults for the C<attribute_metaclass>, C<instance_metaclass>, and |
841
|
|
|
|
|
|
|
C<method_metaclass> options. |
842
|
|
|
|
|
|
|
|
843
|
|
|
|
|
|
|
These all default to the appropriate Moose class. |
844
|
|
|
|
|
|
|
|
845
|
|
|
|
|
|
|
=item B<< Moose::Meta::Class->create($package_name, %options) >> |
846
|
|
|
|
|
|
|
|
847
|
|
|
|
|
|
|
This overrides the parent's method in order to accept a C<roles> |
848
|
|
|
|
|
|
|
option. This should be an array reference containing roles |
849
|
|
|
|
|
|
|
that the class does, each optionally followed by a hashref of options |
850
|
|
|
|
|
|
|
(C<-excludes> and C<-alias>). |
851
|
|
|
|
|
|
|
|
852
|
|
|
|
|
|
|
my $metaclass = Moose::Meta::Class->create( 'New::Class', roles => [...] ); |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
=item B<< Moose::Meta::Class->create_anon_class >> |
855
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
This overrides the parent's method to accept a C<roles> option, just |
857
|
|
|
|
|
|
|
as C<create> does. |
858
|
|
|
|
|
|
|
|
859
|
|
|
|
|
|
|
It also accepts a C<cache> option. If this is C<true>, then the anonymous |
860
|
|
|
|
|
|
|
class will be cached based on its superclasses and roles. If an |
861
|
|
|
|
|
|
|
existing anonymous class in the cache has the same superclasses and |
862
|
|
|
|
|
|
|
roles, it will be reused. |
863
|
|
|
|
|
|
|
|
864
|
|
|
|
|
|
|
my $metaclass = Moose::Meta::Class->create_anon_class( |
865
|
|
|
|
|
|
|
superclasses => ['Foo'], |
866
|
|
|
|
|
|
|
roles => [qw/Some Roles Go Here/], |
867
|
|
|
|
|
|
|
cache => 1, |
868
|
|
|
|
|
|
|
); |
869
|
|
|
|
|
|
|
|
870
|
|
|
|
|
|
|
Each entry in both the C<superclasses> and the C<roles> option can be |
871
|
|
|
|
|
|
|
followed by a hash reference with arguments. The C<superclasses> |
872
|
|
|
|
|
|
|
option can be supplied with a L<-version|Class::MOP/Class Loading |
873
|
|
|
|
|
|
|
Options> option that ensures the loaded superclass satisfies the |
874
|
|
|
|
|
|
|
required version. The C<role> option also takes the C<-version> as an |
875
|
|
|
|
|
|
|
argument, but the option hash reference can also contain any other |
876
|
|
|
|
|
|
|
role relevant values like exclusions or parameterized role arguments. |
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
=item B<< $metaclass->new_object(%params) >> |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
This overrides the parent's method in order to add support for |
881
|
|
|
|
|
|
|
attribute triggers. |
882
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
=item B<< $metaclass->superclasses(@superclasses) >> |
884
|
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
This is the accessor allowing you to read or change the parents of |
886
|
|
|
|
|
|
|
the class. |
887
|
|
|
|
|
|
|
|
888
|
|
|
|
|
|
|
Each superclass can be followed by a hash reference containing a |
889
|
|
|
|
|
|
|
L<-version|Class::MOP/Class Loading Options> value. If the version |
890
|
|
|
|
|
|
|
requirement is not satisfied an error will be thrown. |
891
|
|
|
|
|
|
|
|
892
|
|
|
|
|
|
|
When you pass classes to this method, we will attempt to load them if they are |
893
|
|
|
|
|
|
|
not already loaded. |
894
|
|
|
|
|
|
|
|
895
|
|
|
|
|
|
|
=item B<< $metaclass->add_override_method_modifier($name, $sub) >> |
896
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
This adds an C<override> method modifier to the package. |
898
|
|
|
|
|
|
|
|
899
|
|
|
|
|
|
|
=item B<< $metaclass->add_augment_method_modifier($name, $sub) >> |
900
|
|
|
|
|
|
|
|
901
|
|
|
|
|
|
|
This adds an C<augment> method modifier to the package. |
902
|
|
|
|
|
|
|
|
903
|
|
|
|
|
|
|
=item B<< $metaclass->calculate_all_roles >> |
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
This will return a unique array of L<Moose::Meta::Role> instances |
906
|
|
|
|
|
|
|
which are attached to this class. |
907
|
|
|
|
|
|
|
|
908
|
|
|
|
|
|
|
=item B<< $metaclass->calculate_all_roles_with_inheritance >> |
909
|
|
|
|
|
|
|
|
910
|
|
|
|
|
|
|
This will return a unique array of L<Moose::Meta::Role> instances |
911
|
|
|
|
|
|
|
which are attached to this class, and each of this class's ancestors. |
912
|
|
|
|
|
|
|
|
913
|
|
|
|
|
|
|
=item B<< $metaclass->add_role($role) >> |
914
|
|
|
|
|
|
|
|
915
|
|
|
|
|
|
|
This takes a L<Moose::Meta::Role> object, and adds it to the class's |
916
|
|
|
|
|
|
|
list of roles. This I<does not> actually apply the role to the class. |
917
|
|
|
|
|
|
|
|
918
|
|
|
|
|
|
|
=item B<< $metaclass->role_applications >> |
919
|
|
|
|
|
|
|
|
920
|
|
|
|
|
|
|
Returns a list of L<Moose::Meta::Role::Application::ToClass> |
921
|
|
|
|
|
|
|
objects, which contain the arguments to role application. |
922
|
|
|
|
|
|
|
|
923
|
|
|
|
|
|
|
=item B<< $metaclass->add_role_application($application) >> |
924
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
This takes a L<Moose::Meta::Role::Application::ToClass> object, and |
926
|
|
|
|
|
|
|
adds it to the class's list of role applications. This I<does not> |
927
|
|
|
|
|
|
|
actually apply any role to the class; it is only for tracking role |
928
|
|
|
|
|
|
|
applications. |
929
|
|
|
|
|
|
|
|
930
|
|
|
|
|
|
|
=item B<< $metaclass->does_role($role) >> |
931
|
|
|
|
|
|
|
|
932
|
|
|
|
|
|
|
This returns a boolean indicating whether or not the class does the specified |
933
|
|
|
|
|
|
|
role. The role provided can be either a role name or a L<Moose::Meta::Role> |
934
|
|
|
|
|
|
|
object. This tests both the class and its parents. |
935
|
|
|
|
|
|
|
|
936
|
|
|
|
|
|
|
=item B<< $metaclass->excludes_role($role_name) >> |
937
|
|
|
|
|
|
|
|
938
|
|
|
|
|
|
|
A class excludes a role if it has already composed a role which |
939
|
|
|
|
|
|
|
excludes the named role. This tests both the class and its parents. |
940
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
=item B<< $metaclass->add_attribute($attr_name, %params|$params) >> |
942
|
|
|
|
|
|
|
|
943
|
|
|
|
|
|
|
This overrides the parent's method in order to allow the parameters to |
944
|
|
|
|
|
|
|
be provided as a hash reference. |
945
|
|
|
|
|
|
|
|
946
|
|
|
|
|
|
|
=item B<< $metaclass->constructor_class($class_name) >> |
947
|
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
=item B<< $metaclass->destructor_class($class_name) >> |
949
|
|
|
|
|
|
|
|
950
|
|
|
|
|
|
|
These are the names of classes used when making a class immutable. These |
951
|
|
|
|
|
|
|
default to L<Moose::Meta::Method::Constructor> and |
952
|
|
|
|
|
|
|
L<Moose::Meta::Method::Destructor> respectively. These accessors are |
953
|
|
|
|
|
|
|
read-write, so you can use them to change the class name. |
954
|
|
|
|
|
|
|
|
955
|
|
|
|
|
|
|
=back |
956
|
|
|
|
|
|
|
|
957
|
|
|
|
|
|
|
=head1 BUGS |
958
|
|
|
|
|
|
|
|
959
|
|
|
|
|
|
|
See L<Moose/BUGS> for details on reporting bugs. |
960
|
|
|
|
|
|
|
|
961
|
|
|
|
|
|
|
=head1 AUTHORS |
962
|
|
|
|
|
|
|
|
963
|
|
|
|
|
|
|
=over 4 |
964
|
|
|
|
|
|
|
|
965
|
|
|
|
|
|
|
=item * |
966
|
|
|
|
|
|
|
|
967
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
968
|
|
|
|
|
|
|
|
969
|
|
|
|
|
|
|
=item * |
970
|
|
|
|
|
|
|
|
971
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
972
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
=item * |
974
|
|
|
|
|
|
|
|
975
|
|
|
|
|
|
|
Jesse Luehrs <doy@cpan.org> |
976
|
|
|
|
|
|
|
|
977
|
|
|
|
|
|
|
=item * |
978
|
|
|
|
|
|
|
|
979
|
|
|
|
|
|
|
Shawn M Moore <sartak@cpan.org> |
980
|
|
|
|
|
|
|
|
981
|
|
|
|
|
|
|
=item * |
982
|
|
|
|
|
|
|
|
983
|
|
|
|
|
|
|
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org> |
984
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
=item * |
986
|
|
|
|
|
|
|
|
987
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
988
|
|
|
|
|
|
|
|
989
|
|
|
|
|
|
|
=item * |
990
|
|
|
|
|
|
|
|
991
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
992
|
|
|
|
|
|
|
|
993
|
|
|
|
|
|
|
=item * |
994
|
|
|
|
|
|
|
|
995
|
|
|
|
|
|
|
Hans Dieter Pearcey <hdp@cpan.org> |
996
|
|
|
|
|
|
|
|
997
|
|
|
|
|
|
|
=item * |
998
|
|
|
|
|
|
|
|
999
|
|
|
|
|
|
|
Chris Prather <chris@prather.org> |
1000
|
|
|
|
|
|
|
|
1001
|
|
|
|
|
|
|
=item * |
1002
|
|
|
|
|
|
|
|
1003
|
|
|
|
|
|
|
Matt S Trout <mstrout@cpan.org> |
1004
|
|
|
|
|
|
|
|
1005
|
|
|
|
|
|
|
=back |
1006
|
|
|
|
|
|
|
|
1007
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
1008
|
|
|
|
|
|
|
|
1009
|
|
|
|
|
|
|
This software is copyright (c) 2006 by Infinity Interactive, Inc. |
1010
|
|
|
|
|
|
|
|
1011
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
1012
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
1013
|
|
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
=cut |