line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Role::Method::Required; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2203'; |
3
|
|
|
|
|
|
|
|
4
|
389
|
|
|
389
|
|
2589
|
use strict; |
|
389
|
|
|
|
|
810
|
|
|
389
|
|
|
|
|
10576
|
|
5
|
389
|
|
|
389
|
|
1966
|
use warnings; |
|
389
|
|
|
|
|
834
|
|
|
389
|
|
|
|
|
8446
|
|
6
|
389
|
|
|
389
|
|
1873
|
use metaclass; |
|
389
|
|
|
|
|
820
|
|
|
389
|
|
|
|
|
2140
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use overload |
9
|
70
|
|
|
70
|
|
4864
|
'""' => sub { shift->name }, # stringify to method name |
10
|
4
|
|
|
4
|
|
10
|
'bool' => sub { 1 }, |
11
|
389
|
|
|
389
|
|
2843
|
fallback => 1; |
|
389
|
|
|
|
|
899
|
|
|
389
|
|
|
|
|
4830
|
|
12
|
|
|
|
|
|
|
|
13
|
389
|
|
|
389
|
|
38661
|
use parent 'Class::MOP::Object'; |
|
389
|
|
|
|
|
940
|
|
|
389
|
|
|
|
|
2276
|
|
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
|
8418
|
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.2203 |
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 |