line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::MOP::Method::Generated; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
3
|
|
|
|
|
|
|
|
4
|
450
|
|
|
450
|
|
212661
|
use strict; |
|
450
|
|
|
|
|
1080
|
|
|
450
|
|
|
|
|
13327
|
|
5
|
450
|
|
|
450
|
|
2351
|
use warnings; |
|
450
|
|
|
|
|
1035
|
|
|
450
|
|
|
|
|
11132
|
|
6
|
|
|
|
|
|
|
|
7
|
450
|
|
|
450
|
|
220664
|
use Eval::Closure; |
|
450
|
|
|
|
|
707510
|
|
|
450
|
|
|
|
|
23270
|
|
8
|
|
|
|
|
|
|
|
9
|
450
|
|
|
450
|
|
3352
|
use parent 'Class::MOP::Method'; |
|
450
|
|
|
|
|
1051
|
|
|
450
|
|
|
|
|
2666
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
## accessors |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
1
|
|
|
1
|
0
|
356
|
$_[0]->_throw_exception( CannotCallAnAbstractBaseMethod => package_name => __PACKAGE__ ); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _initialize_body { |
18
|
1
|
|
|
1
|
|
81
|
$_[0]->_throw_exception( NoBodyToInitializeInAnAbstractBaseClass => package_name => __PACKAGE__ ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _generate_description { |
22
|
53544
|
|
|
53544
|
|
97447
|
my ( $self, $context ) = @_; |
23
|
53544
|
|
66
|
|
|
273313
|
$context ||= $self->definition_context; |
24
|
|
|
|
|
|
|
|
25
|
53544
|
|
|
|
|
83437
|
my $desc = "generated method"; |
26
|
53544
|
|
|
|
|
74838
|
my $origin = "unknown origin"; |
27
|
|
|
|
|
|
|
|
28
|
53544
|
100
|
|
|
|
110289
|
if (defined $context) { |
29
|
53493
|
50
|
|
|
|
115035
|
if (defined $context->{description}) { |
30
|
53493
|
|
|
|
|
89632
|
$desc = $context->{description}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
53493
|
100
|
66
|
|
|
132174
|
if (defined $context->{file} || defined $context->{line}) { |
34
|
|
|
|
|
|
|
$origin = "defined at " |
35
|
|
|
|
|
|
|
. (defined $context->{file} |
36
|
|
|
|
|
|
|
? $context->{file} : "<unknown file>") |
37
|
|
|
|
|
|
|
. " line " |
38
|
|
|
|
|
|
|
. (defined $context->{line} |
39
|
52610
|
50
|
|
|
|
222241
|
? $context->{line} : "<unknown line>"); |
|
|
50
|
|
|
|
|
|
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
53544
|
|
|
|
|
253527
|
return "$desc ($origin)"; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _compile_code { |
47
|
53545
|
|
|
53545
|
|
122090
|
my ( $self, @args ) = @_; |
48
|
53545
|
100
|
|
|
|
188229
|
unshift @args, 'source' if @args % 2; |
49
|
53545
|
|
|
|
|
139844
|
my %args = @args; |
50
|
|
|
|
|
|
|
|
51
|
53545
|
|
|
|
|
105758
|
my $context = delete $args{context}; |
52
|
53545
|
100
|
|
|
|
233440
|
my $environment = $self->can('_eval_environment') |
53
|
|
|
|
|
|
|
? $self->_eval_environment |
54
|
|
|
|
|
|
|
: {}; |
55
|
|
|
|
|
|
|
|
56
|
53544
|
|
|
|
|
143165
|
return eval_closure( |
57
|
|
|
|
|
|
|
environment => $environment, |
58
|
|
|
|
|
|
|
description => $self->_generate_description($context), |
59
|
|
|
|
|
|
|
%args, |
60
|
|
|
|
|
|
|
); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# ABSTRACT: Abstract base class for generated methods |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=pod |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=encoding UTF-8 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 NAME |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Class::MOP::Method::Generated - Abstract base class for generated methods |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 VERSION |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
version 2.2206 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 DESCRIPTION |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This is a C<Class::MOP::Method> subclass which is subclassed by |
84
|
|
|
|
|
|
|
C<Class::MOP::Method::Accessor> and |
85
|
|
|
|
|
|
|
C<Class::MOP::Method::Constructor>. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
It is not intended to be used directly. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 AUTHORS |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=over 4 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Jesse Luehrs <doy@cpan.org> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Shawn M Moore <sartak@cpan.org> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item * |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item * |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item * |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Hans Dieter Pearcey <hdp@cpan.org> |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=item * |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Chris Prather <chris@prather.org> |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=item * |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Matt S Trout <mstrout@cpan.org> |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=back |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
This software is copyright (c) 2006 by Infinity Interactive, Inc. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
140
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=cut |