| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Constructor; |
|
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
|
3
|
|
|
|
|
|
|
|
|
4
|
380
|
|
|
380
|
|
2722
|
use strict; |
|
|
380
|
|
|
|
|
861
|
|
|
|
380
|
|
|
|
|
11380
|
|
|
5
|
380
|
|
|
380
|
|
2066
|
use warnings; |
|
|
380
|
|
|
|
|
862
|
|
|
|
380
|
|
|
|
|
10097
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
380
|
|
|
380
|
|
2180
|
use Scalar::Util 'weaken'; |
|
|
380
|
|
|
|
|
874
|
|
|
|
380
|
|
|
|
|
20913
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
380
|
|
|
|
|
3519
|
use parent 'Moose::Meta::Method', |
|
10
|
380
|
|
|
380
|
|
2463
|
'Class::MOP::Method::Constructor'; |
|
|
380
|
|
|
|
|
878
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
380
|
|
|
380
|
|
32428
|
use Moose::Util 'throw_exception'; |
|
|
380
|
|
|
|
|
2465
|
|
|
|
380
|
|
|
|
|
2726
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
|
15
|
748
|
|
|
748
|
1
|
2643
|
my $class = shift; |
|
16
|
748
|
|
|
|
|
4476
|
my %options = @_; |
|
17
|
|
|
|
|
|
|
|
|
18
|
748
|
|
|
|
|
2797
|
my $meta = $options{metaclass}; |
|
19
|
|
|
|
|
|
|
|
|
20
|
748
|
100
|
|
|
|
4465
|
(ref $options{options} eq 'HASH') |
|
21
|
|
|
|
|
|
|
|| throw_exception( MustPassAHashOfOptions => params => \%options, |
|
22
|
|
|
|
|
|
|
class => $class |
|
23
|
|
|
|
|
|
|
); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
($options{package_name} && $options{name}) |
|
26
|
747
|
100
|
66
|
|
|
4913
|
|| throw_exception( MustSupplyPackageNameAndName => params => \%options, |
|
27
|
|
|
|
|
|
|
class => $class |
|
28
|
|
|
|
|
|
|
); |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $self = bless { |
|
31
|
|
|
|
|
|
|
'body' => undef, |
|
32
|
|
|
|
|
|
|
'package_name' => $options{package_name}, |
|
33
|
|
|
|
|
|
|
'name' => $options{name}, |
|
34
|
|
|
|
|
|
|
'options' => $options{options}, |
|
35
|
|
|
|
|
|
|
'associated_metaclass' => $meta, |
|
36
|
|
|
|
|
|
|
'definition_context' => $options{definition_context}, |
|
37
|
746
|
|
50
|
|
|
7753
|
'_expected_method_class' => $options{_expected_method_class} || 'Moose::Object', |
|
38
|
|
|
|
|
|
|
} => $class; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# we don't want this creating |
|
41
|
|
|
|
|
|
|
# a cycle in the code, if not |
|
42
|
|
|
|
|
|
|
# needed |
|
43
|
746
|
|
|
|
|
23106
|
weaken($self->{'associated_metaclass'}); |
|
44
|
|
|
|
|
|
|
|
|
45
|
746
|
|
|
|
|
3355
|
$self->_initialize_body; |
|
46
|
|
|
|
|
|
|
|
|
47
|
745
|
|
|
|
|
3935
|
return $self; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
## method |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub _initialize_body { |
|
53
|
746
|
|
|
746
|
|
2310
|
my $self = shift; |
|
54
|
746
|
|
|
|
|
4669
|
$self->{'body'} = $self->_generate_constructor_method_inline; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# ABSTRACT: Method Meta Object for constructors |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=pod |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=encoding UTF-8 |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 NAME |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Moose::Meta::Method::Constructor - Method Meta Object for constructors |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 VERSION |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
version 2.2206 |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This class is a subclass of L<Class::MOP::Method::Constructor> that |
|
78
|
|
|
|
|
|
|
provides additional Moose-specific functionality |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
To understand this class, you should read the |
|
81
|
|
|
|
|
|
|
L<Class::MOP::Method::Constructor> documentation as well. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 INHERITANCE |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
C<Moose::Meta::Method::Constructor> is a subclass of |
|
86
|
|
|
|
|
|
|
L<Moose::Meta::Method> I<and> L<Class::MOP::Method::Constructor>. |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 BUGS |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
See L<Moose/BUGS> for details on reporting bugs. |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHORS |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=over 4 |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item * |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Jesse Luehrs <doy@cpan.org> |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Shawn M Moore <sartak@cpan.org> |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item * |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org> |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item * |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=item * |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Hans Dieter Pearcey <hdp@cpan.org> |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Chris Prather <chris@prather.org> |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item * |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Matt S Trout <mstrout@cpan.org> |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=back |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
This software is copyright (c) 2006 by Infinity Interactive, Inc. |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
143
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=cut |