line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::MOP::Method::Generated; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2205'; |
3
|
|
|
|
|
|
|
|
4
|
450
|
|
|
450
|
|
212702
|
use strict; |
|
450
|
|
|
|
|
1101
|
|
|
450
|
|
|
|
|
12998
|
|
5
|
450
|
|
|
450
|
|
2392
|
use warnings; |
|
450
|
|
|
|
|
988
|
|
|
450
|
|
|
|
|
11087
|
|
6
|
|
|
|
|
|
|
|
7
|
450
|
|
|
450
|
|
221982
|
use Eval::Closure; |
|
450
|
|
|
|
|
711251
|
|
|
450
|
|
|
|
|
23341
|
|
8
|
|
|
|
|
|
|
|
9
|
450
|
|
|
450
|
|
3356
|
use parent 'Class::MOP::Method'; |
|
450
|
|
|
|
|
1084
|
|
|
450
|
|
|
|
|
2678
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
## accessors |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
1
|
|
|
1
|
0
|
340
|
$_[0]->_throw_exception( CannotCallAnAbstractBaseMethod => package_name => __PACKAGE__ ); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _initialize_body { |
18
|
1
|
|
|
1
|
|
76
|
$_[0]->_throw_exception( NoBodyToInitializeInAnAbstractBaseClass => package_name => __PACKAGE__ ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _generate_description { |
22
|
53544
|
|
|
53544
|
|
98095
|
my ( $self, $context ) = @_; |
23
|
53544
|
|
66
|
|
|
273475
|
$context ||= $self->definition_context; |
24
|
|
|
|
|
|
|
|
25
|
53544
|
|
|
|
|
83419
|
my $desc = "generated method"; |
26
|
53544
|
|
|
|
|
74473
|
my $origin = "unknown origin"; |
27
|
|
|
|
|
|
|
|
28
|
53544
|
100
|
|
|
|
110583
|
if (defined $context) { |
29
|
53493
|
50
|
|
|
|
114355
|
if (defined $context->{description}) { |
30
|
53493
|
|
|
|
|
88734
|
$desc = $context->{description}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
53493
|
100
|
66
|
|
|
132953
|
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
|
|
|
|
221983
|
? $context->{line} : "<unknown line>"); |
|
|
50
|
|
|
|
|
|
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
53544
|
|
|
|
|
253771
|
return "$desc ($origin)"; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _compile_code { |
47
|
53545
|
|
|
53545
|
|
122445
|
my ( $self, @args ) = @_; |
48
|
53545
|
100
|
|
|
|
188597
|
unshift @args, 'source' if @args % 2; |
49
|
53545
|
|
|
|
|
140681
|
my %args = @args; |
50
|
|
|
|
|
|
|
|
51
|
53545
|
|
|
|
|
105705
|
my $context = delete $args{context}; |
52
|
53545
|
100
|
|
|
|
236398
|
my $environment = $self->can('_eval_environment') |
53
|
|
|
|
|
|
|
? $self->_eval_environment |
54
|
|
|
|
|
|
|
: {}; |
55
|
|
|
|
|
|
|
|
56
|
53544
|
|
|
|
|
142678
|
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.2205 |
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 |