line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Role::Method::Required; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2205'; |
3
|
|
|
|
|
|
|
|
4
|
378
|
|
|
378
|
|
2884
|
use strict; |
|
378
|
|
|
|
|
980
|
|
|
378
|
|
|
|
|
11972
|
|
5
|
378
|
|
|
378
|
|
2189
|
use warnings; |
|
378
|
|
|
|
|
1069
|
|
|
378
|
|
|
|
|
10225
|
|
6
|
378
|
|
|
378
|
|
2293
|
use metaclass; |
|
378
|
|
|
|
|
959
|
|
|
378
|
|
|
|
|
2437
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use overload |
9
|
70
|
|
|
70
|
|
5559
|
'""' => sub { shift->name }, # stringify to method name |
10
|
4
|
|
|
4
|
|
12
|
'bool' => sub { 1 }, |
11
|
378
|
|
|
378
|
|
3197
|
fallback => 1; |
|
378
|
|
|
|
|
1123
|
|
|
378
|
|
|
|
|
6615
|
|
12
|
|
|
|
|
|
|
|
13
|
378
|
|
|
378
|
|
43644
|
use parent 'Class::MOP::Object'; |
|
378
|
|
|
|
|
1194
|
|
|
378
|
|
|
|
|
2713
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# This is not a Moose::Meta::Role::Method because it has no implementation, it |
16
|
|
|
|
|
|
|
# is just a name |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__PACKAGE__->meta->add_attribute('name' => ( |
19
|
|
|
|
|
|
|
reader => 'name', |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
Class::MOP::_definition_context(), |
22
|
|
|
|
|
|
|
)); |
23
|
|
|
|
|
|
|
|
24
|
320
|
|
|
320
|
1
|
9423
|
sub new { shift->_new(@_) } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# ABSTRACT: A Moose metaclass for required methods in Roles |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in Roles |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 2.2205 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 INHERITANCE |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>. |
49
|
|
|
|
|
|
|
It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not |
50
|
|
|
|
|
|
|
provide an implementation of the method. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 METHODS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 Moose::Meta::Role::Method::Required->new(%options) |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This creates a new type constraint based on the provided C<%options>: |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=over 4 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item * name |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
The method name. This is required. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=back |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 $method->name |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Returns the required method's name, as provided to the constructor. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 BUGS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
See L<Moose/BUGS> for details on reporting bugs. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 AUTHORS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over 4 |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Jesse Luehrs <doy@cpan.org> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item * |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Shawn M Moore <sartak@cpan.org> |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org> |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Hans Dieter Pearcey <hdp@cpan.org> |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Chris Prather <chris@prather.org> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item * |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Matt S Trout <mstrout@cpan.org> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=back |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This software is copyright (c) 2006 by Infinity Interactive, Inc. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
125
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut |