← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:34 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose.pm
StatementsExecuted 327 statements in 4.75ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1113.54ms18.3msMoose::::BEGIN@28Moose::BEGIN@28
1113.48ms79.0msMoose::::BEGIN@19Moose::BEGIN@19
1113.02ms16.9msMoose::::BEGIN@36Moose::BEGIN@36
1112.12ms8.96msMoose::::BEGIN@29Moose::BEGIN@29
1111.95ms2.23msMoose::::BEGIN@14Moose::BEGIN@14
1111.33ms2.66msMoose::::BEGIN@39Moose::BEGIN@39
1111.09ms2.92msMoose::::BEGIN@40Moose::BEGIN@40
111981µs15.0msMoose::::BEGIN@15Moose::BEGIN@15
111868µs2.83msMoose::::BEGIN@37Moose::BEGIN@37
111862µs3.76msMoose::::BEGIN@34Moose::BEGIN@34
111859µs1.62msMoose::::BEGIN@41Moose::BEGIN@41
111823µs98.1msMoose::::BEGIN@30Moose::BEGIN@30
111656µs2.11msMoose::::BEGIN@38Moose::BEGIN@38
711491µs23.8msMoose::::init_metaMoose::init_meta
111445µs1.87msMoose::::BEGIN@47Moose::BEGIN@47
111421µs762µsMoose::::BEGIN@13Moose::BEGIN@13
111378µs1.62msMoose::::BEGIN@42Moose::BEGIN@42
111238µs1.70msMoose::::BEGIN@32Moose::BEGIN@32
111211µs211µsMoose::::bootstrapMoose::bootstrap (xsub)
111205µs2.20msMoose::::BEGIN@18Moose::BEGIN@18
1273201µs28.8msMoose::::hasMoose::has
64457µs215msMoose::::withMoose::with
43351µs13.8msMoose::::extendsMoose::extends (recurses: max depth 1, inclusive time 797µs)
11114µs14µsMoose::::BEGIN@11Moose::BEGIN@11
11110µs1.54msMoose::::BEGIN@44Moose::BEGIN@44
1118µs8µsMoose::::BEGIN@2Moose::BEGIN@2
1117µs7µsMoose::::BEGIN@31Moose::BEGIN@31
1116µs6µsMoose::::BEGIN@21Moose::BEGIN@21
1116µs21µsMoose::::BEGIN@9Moose::BEGIN@9
1116µs9µsMoose::::BEGIN@8Moose::BEGIN@8
1114µs4µsMoose::::BEGIN@45Moose::BEGIN@45
1113µs3µsMoose::::BEGIN@23Moose::BEGIN@23
0000s0sMoose::::_get_callerMoose::_get_caller
0000s0sMoose::::afterMoose::after
0000s0sMoose::::aroundMoose::around
0000s0sMoose::::augmentMoose::augment
0000s0sMoose::::beforeMoose::before
0000s0sMoose::::innerMoose::inner
0000s0sMoose::::overrideMoose::override
0000s0sMoose::::superMoose::super
0000s0sMoose::::throw_errorMoose::throw_error
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose;
2
# spent 8µs within Moose::BEGIN@2 which was called: # once (8µs+0s) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 4
BEGIN {
314µs $Moose::AUTHORITY = 'cpan:STEVAN';
4120µs18µs}
# spent 8µs making 1 call to Moose::BEGIN@2
5{
621µs $Moose::VERSION = '2.0602';
7}
8316µs212µs
# spent 9µs (6+3) within Moose::BEGIN@8 which was called: # once (6µs+3µs) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 8
use strict;
# spent 9µs making 1 call to Moose::BEGIN@8 # spent 3µs making 1 call to strict::import
9317µs235µs
# spent 21µs (6+15) within Moose::BEGIN@9 which was called: # once (6µs+15µs) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 9
use warnings;
# spent 21µs making 1 call to Moose::BEGIN@9 # spent 15µs making 1 call to warnings::import
10
11328µs114µs
# spent 14µs within Moose::BEGIN@11 which was called: # once (14µs+0s) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 11
use 5.008;
# spent 14µs making 1 call to Moose::BEGIN@11
12
13392µs2832µs
# spent 762µs (421+341) within Moose::BEGIN@13 which was called: # once (421µs+341µs) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 13
use Scalar::Util 'blessed';
# spent 762µs making 1 call to Moose::BEGIN@13 # spent 70µs making 1 call to Exporter::import
14379µs22.32ms
# spent 2.23ms (1.95+276µs) within Moose::BEGIN@14 which was called: # once (1.95ms+276µs) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 14
use Carp 'confess';
# spent 2.23ms making 1 call to Moose::BEGIN@14 # spent 95µs making 1 call to Exporter::import
153112µs215.1ms
# spent 15.0ms (981µs+14.1) within Moose::BEGIN@15 which was called: # once (981µs+14.1ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 15
use Class::Load 'is_class_loaded';
# spent 15.0ms making 1 call to Moose::BEGIN@15 # spent 48µs making 1 call to Exporter::import
16
17
18383µs22.20ms
# spent 2.20ms (205µs+1.99) within Moose::BEGIN@18 which was called: # once (205µs+1.99ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 18
use Moose::Deprecated;
# spent 2.20ms making 1 call to Moose::BEGIN@18 # spent 5µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:61]
193108µs279.0ms
# spent 79.0ms (3.48+75.5) within Moose::BEGIN@19 which was called: # once (3.48ms+75.5ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 19
use Moose::Exporter;
# spent 79.0ms making 1 call to Moose::BEGIN@19 # spent 34µs making 1 call to Moose::Exporter::import
20
21339µs16µs
# spent 6µs within Moose::BEGIN@21 which was called: # once (6µs+0s) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 21
use Class::MOP;
# spent 6µs making 1 call to Moose::BEGIN@21
22
23
# spent 3µs within Moose::BEGIN@23 which was called: # once (3µs+0s) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 26
BEGIN {
2414µs die "Class::MOP version $Moose::VERSION required--this is version $Class::MOP::VERSION"
25 if $Moose::VERSION && $Class::MOP::VERSION ne $Moose::VERSION;
26114µs13µs}
# spent 3µs making 1 call to Moose::BEGIN@23
27
283147µs118.3ms
# spent 18.3ms (3.54+14.7) within Moose::BEGIN@28 which was called: # once (3.54ms+14.7ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 28
use Moose::Meta::Class;
# spent 18.3ms making 1 call to Moose::BEGIN@28
293177µs18.96ms
# spent 8.96ms (2.12+6.84) within Moose::BEGIN@29 which was called: # once (2.12ms+6.84ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 29
use Moose::Meta::TypeConstraint;
# spent 8.96ms making 1 call to Moose::BEGIN@29
303160µs198.1ms
# spent 98.1ms (823µs+97.3) within Moose::BEGIN@30 which was called: # once (823µs+97.3ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 30
use Moose::Meta::TypeCoercion;
# spent 98.1ms making 1 call to Moose::BEGIN@30
31319µs17µs
# spent 7µs within Moose::BEGIN@31 which was called: # once (7µs+0s) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 31
use Moose::Meta::Attribute;
# spent 7µs making 1 call to Moose::BEGIN@31
323158µs11.70ms
# spent 1.70ms (238µs+1.46) within Moose::BEGIN@32 which was called: # once (238µs+1.46ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 32
use Moose::Meta::Instance;
# spent 1.70ms making 1 call to Moose::BEGIN@32
33
343138µs13.76ms
# spent 3.76ms (862µs+2.90) within Moose::BEGIN@34 which was called: # once (862µs+2.90ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 34
use Moose::Object;
# spent 3.76ms making 1 call to Moose::BEGIN@34
35
363148µs116.9ms
# spent 16.9ms (3.02+13.9) within Moose::BEGIN@36 which was called: # once (3.02ms+13.9ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 36
use Moose::Meta::Role;
# spent 16.9ms making 1 call to Moose::BEGIN@36
373208µs12.83ms
# spent 2.83ms (868µs+1.96) within Moose::BEGIN@37 which was called: # once (868µs+1.96ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 37
use Moose::Meta::Role::Composite;
# spent 2.83ms making 1 call to Moose::BEGIN@37
383144µs12.11ms
# spent 2.11ms (656µs+1.45) within Moose::BEGIN@38 which was called: # once (656µs+1.45ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 38
use Moose::Meta::Role::Application;
# spent 2.11ms making 1 call to Moose::BEGIN@38
393148µs12.66ms
# spent 2.66ms (1.33+1.32) within Moose::BEGIN@39 which was called: # once (1.33ms+1.32ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 39
use Moose::Meta::Role::Application::RoleSummation;
# spent 2.66ms making 1 call to Moose::BEGIN@39
403147µs12.92ms
# spent 2.92ms (1.09+1.83) within Moose::BEGIN@40 which was called: # once (1.09ms+1.83ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 40
use Moose::Meta::Role::Application::ToClass;
# spent 2.92ms making 1 call to Moose::BEGIN@40
413132µs11.62ms
# spent 1.62ms (859µs+764µs) within Moose::BEGIN@41 which was called: # once (859µs+764µs) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 41
use Moose::Meta::Role::Application::ToRole;
# spent 1.62ms making 1 call to Moose::BEGIN@41
423114µs11.62ms
# spent 1.62ms (378µs+1.25) within Moose::BEGIN@42 which was called: # once (378µs+1.25ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 42
use Moose::Meta::Role::Application::ToInstance;
# spent 1.62ms making 1 call to Moose::BEGIN@42
43
44337µs23.08ms
# spent 1.54ms (10µs+1.53) within Moose::BEGIN@44 which was called: # once (10µs+1.53ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 44
use Moose::Util::TypeConstraints;
# spent 1.54ms making 1 call to Moose::BEGIN@44 # spent 1.53ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:492]
45319µs14µs
# spent 4µs within Moose::BEGIN@45 which was called: # once (4µs+0s) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 45
use Moose::Util ();
# spent 4µs making 1 call to Moose::BEGIN@45
46
4731.25ms11.87ms
# spent 1.87ms (445µs+1.42) within Moose::BEGIN@47 which was called: # once (445µs+1.42ms) by Tapper::MCP::Scheduler::Controller::BEGIN@6 at line 47
use Moose::Meta::Attribute::Native;
# spent 1.87ms making 1 call to Moose::BEGIN@47
48
49sub throw_error {
50 # FIXME This
51 shift;
52 goto \&confess
53}
54
55
# spent 13.8ms (51µs+13.8) within Moose::extends which was called 4 times, avg 3.45ms/call: # 2 times (26µs+6.45ms) by Moose::extends at line 382 of Moose/Exporter.pm, avg 3.24ms/call # once (15µs+6.50ms) by Tapper::MCP::Scheduler::Controller::BEGIN@11 at line 18 of lib/Tapper/MCP/Net.pm # once (10µs+807µs) by Module::Runtime::require_module at line 10 of lib/Tapper/MCP.pm
sub extends {
56616µs my $meta = shift;
57
58 Moose->throw_error("Must derive at least one class") unless @_;
59
60 # this checks the metaclass to make sure
61 # it is correct, sometimes it can get out
62 # of sync when the classes are being built
6326.47ms $meta->superclasses(@_);
# spent 7.25ms making 2 calls to Moose::Meta::Class::superclasses, avg 3.62ms/call, recursion: max depth 1, sum of overlapping time 780µs
64}
65
66
# spent 215ms (57µs+215) within Moose::with which was called 6 times, avg 35.8ms/call: # 3 times (20µs+107ms) by Moose::with at line 382 of Moose/Exporter.pm, avg 35.8ms/call # once (13µs+56.5ms) by Tapper::MCP::Scheduler::Controller::BEGIN@1 at line 61 of lib/Tapper/MCP/Scheduler/Algorithm.pm # once (15µs+43.5ms) by base::import at line 18 of Tapper/Base.pm # once (9µs+7.44ms) by main::BEGIN@1 at line 28 of lib/Tapper/MCP/Scheduler/Controller.pm
sub with {
67323µs3107ms Moose::Util::apply_all_roles(shift, @_);
# spent 107ms making 3 calls to Moose::Util::apply_all_roles, avg 35.8ms/call
68}
69
70
# spent 28.8ms (201µs+28.6) within Moose::has which was called 12 times, avg 2.40ms/call: # 6 times (138µs+14.2ms) by Moose::has at line 382 of Moose/Exporter.pm, avg 2.39ms/call # once (11µs+2.91ms) by Tapper::MCP::Scheduler::Controller::BEGIN@1 at line 13 of lib/Tapper/MCP/Scheduler/Algorithm.pm # once (12µs+2.67ms) by main::BEGIN@1 at line 13 of lib/Tapper/MCP/Scheduler/Controller.pm # once (10µs+2.45ms) by main::BEGIN@1 at line 14 of lib/Tapper/MCP/Scheduler/Controller.pm # once (10µs+2.42ms) by main::BEGIN@1 at line 23 of lib/Tapper/MCP/Scheduler/Controller.pm # once (10µs+2.09ms) by main::BEGIN@1 at line 26 of lib/Tapper/MCP/Scheduler/Controller.pm # once (10µs+1.88ms) by main::BEGIN@1 at line 25 of lib/Tapper/MCP/Scheduler/Controller.pm
sub has {
7142136µs my $meta = shift;
72 my $name = shift;
73
74 Moose->throw_error('Usage: has \'name\' => ( key => value, ... )')
75 if @_ % 2 == 1;
76
77680µs my %options = ( definition_context => Moose::Util::_caller_info(), @_ );
# spent 80µs making 6 calls to Moose::Util::_caller_info, avg 13µs/call
78 my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ];
79614.1ms $meta->add_attribute( $_, %options ) for @$attrs;
# spent 14.1ms making 6 calls to Moose::Meta::Class::add_attribute, avg 2.35ms/call
80}
81
82sub before {
83 Moose::Util::add_method_modifier(shift, 'before', \@_);
84}
85
86sub after {
87 Moose::Util::add_method_modifier(shift, 'after', \@_);
88}
89
90sub around {
91 Moose::Util::add_method_modifier(shift, 'around', \@_);
92}
93
941100nsour $SUPER_PACKAGE;
951100nsour $SUPER_BODY;
961500nsour @SUPER_ARGS;
97
98sub super {
99 # This check avoids a recursion loop - see
100 # t/bugs/super_recursion.t
101 return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller();
102 return unless $SUPER_BODY; $SUPER_BODY->(@SUPER_ARGS);
103}
104
105sub override {
106 my $meta = shift;
107 my ( $name, $method ) = @_;
108 $meta->add_override_method_modifier( $name => $method );
109}
110
111sub inner {
112 my $pkg = caller();
113 our ( %INNER_BODY, %INNER_ARGS );
114
115 if ( my $body = $INNER_BODY{$pkg} ) {
116 my @args = @{ $INNER_ARGS{$pkg} };
117 local $INNER_ARGS{$pkg};
118 local $INNER_BODY{$pkg};
119 return $body->(@args);
120 } else {
121 return;
122 }
123}
124
125sub augment {
126 my $meta = shift;
127 my ( $name, $method ) = @_;
128 $meta->add_augment_method_modifier( $name => $method );
129}
130
131110µs1943µsMoose::Exporter->setup_import_methods(
# spent 943µs making 1 call to Moose::Exporter::setup_import_methods
132 with_meta => [
133 qw( extends with has before after around override augment )
134 ],
135 as_is => [
136 qw( super inner ),
137 \&Carp::confess,
138 \&Scalar::Util::blessed,
139 ],
140);
141
142
# spent 23.8ms (491µs+23.3) within Moose::init_meta which was called 7 times, avg 3.40ms/call: # 7 times (491µs+23.3ms) by Moose::Exporter::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Exporter.pm:492] at line 447 of Moose/Exporter.pm, avg 3.40ms/call
sub init_meta {
143140555µs shift;
144 my %args = @_;
145
146 my $class = $args{for_class}
147 or Moose->throw_error("Cannot call init_meta without specifying a for_class");
148 my $base_class = $args{base_class} || 'Moose::Object';
149 my $metaclass = $args{metaclass} || 'Moose::Meta::Class';
150 my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta';
151
152744µs Moose->throw_error("The Metaclass $metaclass must be loaded. (Perhaps you forgot to 'use $metaclass'?)")
# spent 44µs making 7 calls to Class::Load::XS::is_class_loaded, avg 6µs/call
153 unless is_class_loaded($metaclass);
154
155717µs Moose->throw_error("The Metaclass $metaclass must be a subclass of Moose::Meta::Class.")
# spent 17µs making 7 calls to UNIVERSAL::isa, avg 2µs/call
156 unless $metaclass->isa('Moose::Meta::Class');
157
158 # make a subtype for each Moose class
159146.55ms class_type($class)
# spent 6.34ms making 7 calls to Moose::Util::TypeConstraints::class_type, avg 906µs/call # spent 213µs making 7 calls to Moose::Util::TypeConstraints::find_type_constraint, avg 30µs/call
160 unless find_type_constraint($class);
161
162 my $meta;
163
164727µs if ( $meta = Class::MOP::get_metaclass_by_name($class) ) {
# spent 27µs making 7 calls to Class::MOP::get_metaclass_by_name, avg 4µs/call
165 unless ( $meta->isa("Moose::Meta::Class") ) {
166 my $error_message = "$class already has a metaclass, but it does not inherit $metaclass ($meta).";
167 if ( $meta->isa('Moose::Meta::Role') ) {
168 Moose->throw_error($error_message . ' You cannot make the same thing a role and a class. Remove either Moose or Moose::Role.');
169 } else {
170 Moose->throw_error($error_message);
171 }
172 }
173 } else {
174 # no metaclass
175
176 # now we check whether our ancestors have metaclass, and if so borrow that
177765µs my ( undef, @isa ) = @{ mro::get_linear_isa($class) };
# spent 65µs making 7 calls to mro::get_linear_isa, avg 9µs/call
178
179 foreach my $ancestor ( @isa ) {
180 my $ancestor_meta = Class::MOP::get_metaclass_by_name($ancestor) || next;
181
182 my $ancestor_meta_class = $ancestor_meta->_real_ref_name;
183
184 # if we have an ancestor metaclass that inherits $metaclass, we use
185 # that. This is like _fix_metaclass_incompatibility, but we can do it now.
186
187 # the case of having an ancestry is not very common, but arises in
188 # e.g. Reaction
189 unless ( $metaclass->isa( $ancestor_meta_class ) ) {
190 if ( $ancestor_meta_class->isa($metaclass) ) {
191 $metaclass = $ancestor_meta_class;
192 }
193 }
194 }
195
19675.97ms $meta = $metaclass->initialize($class);
# spent 5.97ms making 7 calls to Moose::Meta::Class::initialize, avg 853µs/call
197 }
198
199 if (defined $meta_name) {
200 # also check for inherited non moose 'meta' method?
2017269µs my $existing = $meta->get_method($meta_name);
# spent 269µs making 7 calls to Class::MOP::Mixin::HasMethods::get_method, avg 38µs/call
202 if ($existing && !$existing->isa('Class::MOP::Method::Meta')) {
203 Carp::cluck "Moose is overwriting an existing method named "
204 . "$meta_name in class $class with a method "
205 . "which returns the class's metaclass. If this is "
206 . "actually what you want, you should remove the "
207 . "existing method, otherwise, you should rename or "
208 . "disable this generated method using the "
209 . "'-meta_name' option to 'use Moose'.";
210 }
21174.16ms $meta->_add_meta_method($meta_name);
# spent 4.16ms making 7 calls to Class::MOP::Mixin::HasMethods::_add_meta_method, avg 595µs/call
212 }
213
214 # make sure they inherit from Moose::Object
215145.35ms $meta->superclasses($base_class)
# spent 6.17ms making 14 calls to Moose::Meta::Class::superclasses, avg 441µs/call, recursion: max depth 1, sum of overlapping time 819µs
216 unless $meta->superclasses();
217
218 return $meta;
219}
220
221# This may be used in some older MooseX extensions.
222sub _get_caller {
223 goto &Moose::Exporter::_get_caller;
224}
225
226## make 'em all immutable
227
2282121µs2113µs$_->make_immutable(
# spent 13µs making 21 calls to Class::MOP::Class::is_mutable, avg 638ns/call
229 inline_constructor => 1,
230 constructor_name => "_new",
231 # these are Class::MOP accessors, so they need inlining
232 inline_accessors => 1
23322171µs4271.8ms ) for grep { $_->is_mutable }
# spent 69.9ms making 21 calls to Class::MOP::Class::make_immutable, avg 3.33ms/call # spent 1.80ms making 9 calls to Class::MOP::Object::meta, avg 200µs/call # spent 21µs making 2 calls to Moose::Meta::Role::Method::Required::meta, avg 10µs/call # spent 12µs making 1 call to Moose::Meta::TypeCoercion::meta # spent 12µs making 1 call to Moose::Meta::Role::meta # spent 12µs making 1 call to Moose::Meta::TypeCoercion::Union::meta # spent 11µs making 1 call to Moose::Meta::Role::Composite::meta # spent 11µs making 1 call to Moose::Meta::Role::Application::meta # spent 11µs making 1 call to Moose::Meta::Role::Application::ToInstance::meta # spent 11µs making 1 call to Moose::Meta::Role::Application::ToRole::meta # spent 11µs making 1 call to Moose::Meta::Role::Application::RoleSummation::meta # spent 11µs making 1 call to Class::MOP::Mixin::meta # spent 10µs making 1 call to Moose::Meta::Role::Application::ToClass::meta
234 map { $_->meta }
235 qw(
236 Moose::Meta::Attribute
237 Moose::Meta::Class
238 Moose::Meta::Instance
239
240 Moose::Meta::TypeCoercion
241 Moose::Meta::TypeCoercion::Union
242
243 Moose::Meta::Method
244 Moose::Meta::Method::Constructor
245 Moose::Meta::Method::Destructor
246 Moose::Meta::Method::Overridden
247 Moose::Meta::Method::Augmented
248
249 Moose::Meta::Role
250 Moose::Meta::Role::Attribute
251 Moose::Meta::Role::Method
252 Moose::Meta::Role::Method::Required
253 Moose::Meta::Role::Method::Conflicting
254
255 Moose::Meta::Role::Composite
256
257 Moose::Meta::Role::Application
258 Moose::Meta::Role::Application::RoleSummation
259 Moose::Meta::Role::Application::ToClass
260 Moose::Meta::Role::Application::ToRole
261 Moose::Meta::Role::Application::ToInstance
2621200ns);
263
26435µs33µs$_->make_immutable(
# spent 3µs making 3 calls to Class::MOP::Class::is_mutable, avg 967ns/call
265 inline_constructor => 0,
266 constructor_name => undef,
267 # these are Class::MOP accessors, so they need inlining
268 inline_accessors => 1
269432µs68.12ms ) for grep { $_->is_mutable }
# spent 7.56ms making 3 calls to Class::MOP::Class::make_immutable, avg 2.52ms/call # spent 549µs making 2 calls to Class::MOP::Object::meta, avg 275µs/call # spent 12µs making 1 call to Class::MOP::Mixin::meta
270 map { $_->meta }
271 qw(
272 Moose::Meta::Method::Accessor
273 Moose::Meta::Method::Delegation
274 Moose::Meta::Mixin::AttributeCore
2751200ns);
276
277124µs1;
278
279# ABSTRACT: A postmodern object system for Perl 5
280
- -
283=pod
284
285=head1 NAME
286
287Moose - A postmodern object system for Perl 5
288
289=head1 VERSION
290
291version 2.0602
292
293=head1 SYNOPSIS
294
295 package Point;
296 use Moose; # automatically turns on strict and warnings
297
298 has 'x' => (is => 'rw', isa => 'Int');
299 has 'y' => (is => 'rw', isa => 'Int');
300
301 sub clear {
302 my $self = shift;
303 $self->x(0);
304 $self->y(0);
305 }
306
307 package Point3D;
308 use Moose;
309
310 extends 'Point';
311
312 has 'z' => (is => 'rw', isa => 'Int');
313
314 after 'clear' => sub {
315 my $self = shift;
316 $self->z(0);
317 };
318
319=head1 DESCRIPTION
320
321Moose is an extension of the Perl 5 object system.
322
323The main goal of Moose is to make Perl 5 Object Oriented programming
324easier, more consistent, and less tedious. With Moose you can think
325more about what you want to do and less about the mechanics of OOP.
326
327Additionally, Moose is built on top of L<Class::MOP>, which is a
328metaclass system for Perl 5. This means that Moose not only makes
329building normal Perl 5 objects better, but it provides the power of
330metaclass programming as well.
331
332=head2 New to Moose?
333
334If you're new to Moose, the best place to start is the
335L<Moose::Manual> docs, followed by the L<Moose::Cookbook>. The intro
336will show you what Moose is, and how it makes Perl 5 OO better.
337
338The cookbook recipes on Moose basics will get you up to speed with
339many of Moose's features quickly. Once you have an idea of what Moose
340can do, you can use the API documentation to get more detail on
341features which interest you.
342
343=head2 Moose Extensions
344
345The C<MooseX::> namespace is the official place to find Moose extensions.
346These extensions can be found on the CPAN. The easiest way to find them
347is to search for them (L<http://search.cpan.org/search?query=MooseX::>),
348or to examine L<Task::Moose> which aims to keep an up-to-date, easily
349installable list of Moose extensions.
350
351=head1 TRANSLATIONS
352
353Much of the Moose documentation has been translated into other languages.
354
355=over 4
356
357=item Japanese
358
359Japanese docs can be found at
360L<http://perldoc.perlassociation.org/pod/Moose-Doc-JA/index.html>. The
361source POD files can be found in GitHub:
362L<http://github.com/jpa/Moose-Doc-JA>
363
364=back
365
366=head1 BUILDING CLASSES WITH MOOSE
367
368Moose makes every attempt to provide as much convenience as possible during
369class construction/definition, but still stay out of your way if you want it
370to. Here are a few items to note when building classes with Moose.
371
372When you C<use Moose>, Moose will set the class's parent class to
373L<Moose::Object>, I<unless> the class using Moose already has a parent
374class. In addition, specifying a parent with C<extends> will change the parent
375class.
376
377Moose will also manage all attributes (including inherited ones) that are
378defined with C<has>. And (assuming you call C<new>, which is inherited from
379L<Moose::Object>) this includes properly initializing all instance slots,
380setting defaults where appropriate, and performing any type constraint checking
381or coercion.
382
383=head1 PROVIDED METHODS
384
385Moose provides a number of methods to all your classes, mostly through the
386inheritance of L<Moose::Object>. There is however, one exception.
387
388=over 4
389
390=item B<meta>
391
392This is a method which provides access to the current class's metaclass.
393
394=back
395
396=head1 EXPORTED FUNCTIONS
397
398Moose will export a number of functions into the class's namespace which
399may then be used to set up the class. These functions all work directly
400on the current class.
401
402=over 4
403
404=item B<extends (@superclasses)>
405
406This function will set the superclass(es) for the current class.
407
408This approach is recommended instead of C<use base>, because C<use base>
409actually C<push>es onto the class's C<@ISA>, whereas C<extends> will
410replace it. This is important to ensure that classes which do not have
411superclasses still properly inherit from L<Moose::Object>.
412
413Each superclass can be followed by a hash reference with options. Currently,
414only L<-version|Class::MOP/Class Loading Options> is recognized:
415
416 extends 'My::Parent' => { -version => 0.01 },
417 'My::OtherParent' => { -version => 0.03 };
418
419An exception will be thrown if the version requirements are not
420satisfied.
421
422=item B<with (@roles)>
423
424This will apply a given set of C<@roles> to the local class.
425
426Like with C<extends>, each specified role can be followed by a hash
427reference with a L<-version|Class::MOP/Class Loading Options> option:
428
429 with 'My::Role' => { -version => 0.32 },
430 'My::Otherrole' => { -version => 0.23 };
431
432The specified version requirements must be satisfied, otherwise an
433exception will be thrown.
434
435If your role takes options or arguments, they can be passed along in the
436hash reference as well.
437
438=item B<has $name|@$names =E<gt> %options>
439
440This will install an attribute of a given C<$name> into the current class. If
441the first parameter is an array reference, it will create an attribute for
442every C<$name> in the list. The C<%options> will be passed to the constructor
443for L<Moose::Meta::Attribute> (which inherits from L<Class::MOP::Attribute>),
444so the full documentation for the valid options can be found there. These are
445the most commonly used options:
446
447=over 4
448
449=item I<is =E<gt> 'rw'|'ro'>
450
451The I<is> option accepts either I<rw> (for read/write) or I<ro> (for read
452only). These will create either a read/write accessor or a read-only
453accessor respectively, using the same name as the C<$name> of the attribute.
454
455If you need more control over how your accessors are named, you can
456use the L<reader|Class::MOP::Attribute/reader>,
457L<writer|Class::MOP::Attribute/writer> and
458L<accessor|Class::MOP::Attribute/accessor> options inherited from
459L<Class::MOP::Attribute>, however if you use those, you won't need the
460I<is> option.
461
462=item I<isa =E<gt> $type_name>
463
464The I<isa> option uses Moose's type constraint facilities to set up runtime
465type checking for this attribute. Moose will perform the checks during class
466construction, and within any accessors. The C<$type_name> argument must be a
467string. The string may be either a class name or a type defined using
468Moose's type definition features. (Refer to L<Moose::Util::TypeConstraints>
469for information on how to define a new type, and how to retrieve type meta-data).
470
471=item I<coerce =E<gt> (1|0)>
472
473This will attempt to use coercion with the supplied type constraint to change
474the value passed into any accessors or constructors. You B<must> supply a type
475constraint, and that type constraint B<must> define a coercion. See
476L<Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion> for an example.
477
478=item I<does =E<gt> $role_name>
479
480This will accept the name of a role which the value stored in this attribute
481is expected to have consumed.
482
483=item I<required =E<gt> (1|0)>
484
485This marks the attribute as being required. This means a value must be
486supplied during class construction, I<or> the attribute must be lazy
487and have either a default or a builder. Note that c<required> does not
488say anything about the attribute's value, which can be C<undef>.
489
490=item I<weak_ref =E<gt> (1|0)>
491
492This will tell the class to store the value of this attribute as a weakened
493reference. If an attribute is a weakened reference, it B<cannot> also be
494coerced. Note that when a weak ref expires, the attribute's value becomes
495undefined, and is still considered to be set for purposes of predicate,
496default, etc.
497
498=item I<lazy =E<gt> (1|0)>
499
500This will tell the class to not create this slot until absolutely necessary.
501If an attribute is marked as lazy it B<must> have a default or builder
502supplied.
503
504=item I<trigger =E<gt> $code>
505
506The I<trigger> option is a CODE reference which will be called after
507the value of the attribute is set. The CODE ref is passed the
508instance itself, the updated value, and the original value if the
509attribute was already set.
510
511You B<can> have a trigger on a read-only attribute.
512
513B<NOTE:> Triggers will only fire when you B<assign> to the attribute,
514either in the constructor, or using the writer. Default and built values will
515B<not> cause the trigger to be fired.
516
517=item I<handles =E<gt> ARRAY | HASH | REGEXP | ROLE | ROLETYPE | DUCKTYPE | CODE>
518
519The I<handles> option provides Moose classes with automated delegation features.
520This is a pretty complex and powerful option. It accepts many different option
521formats, each with its own benefits and drawbacks.
522
523B<NOTE:> The class being delegated to does not need to be a Moose based class,
524which is why this feature is especially useful when wrapping non-Moose classes.
525
526All I<handles> option formats share the following traits:
527
528You cannot override a locally defined method with a delegated method; an
529exception will be thrown if you try. That is to say, if you define C<foo> in
530your class, you cannot override it with a delegated C<foo>. This is almost never
531something you would want to do, and if it is, you should do it by hand and not
532use Moose.
533
534You cannot override any of the methods found in Moose::Object, or the C<BUILD>
535and C<DEMOLISH> methods. These will not throw an exception, but will silently
536move on to the next method in the list. My reasoning for this is that you would
537almost never want to do this, since it usually breaks your class. As with
538overriding locally defined methods, if you do want to do this, you should do it
539manually, not with Moose.
540
541You do not I<need> to have a reader (or accessor) for the attribute in order
542to delegate to it. Moose will create a means of accessing the value for you,
543however this will be several times B<less> efficient then if you had given
544the attribute a reader (or accessor) to use.
545
546Below is the documentation for each option format:
547
548=over 4
549
550=item C<ARRAY>
551
552This is the most common usage for I<handles>. You basically pass a list of
553method names to be delegated, and Moose will install a delegation method
554for each one.
555
556=item C<HASH>
557
558This is the second most common usage for I<handles>. Instead of a list of
559method names, you pass a HASH ref where each key is the method name you
560want installed locally, and its value is the name of the original method
561in the class being delegated to.
562
563This can be very useful for recursive classes like trees. Here is a
564quick example (soon to be expanded into a Moose::Cookbook recipe):
565
566 package Tree;
567 use Moose;
568
569 has 'node' => (is => 'rw', isa => 'Any');
570
571 has 'children' => (
572 is => 'ro',
573 isa => 'ArrayRef',
574 default => sub { [] }
575 );
576
577 has 'parent' => (
578 is => 'rw',
579 isa => 'Tree',
580 weak_ref => 1,
581 handles => {
582 parent_node => 'node',
583 siblings => 'children',
584 }
585 );
586
587In this example, the Tree package gets C<parent_node> and C<siblings> methods,
588which delegate to the C<node> and C<children> methods (respectively) of the Tree
589instance stored in the C<parent> slot.
590
591You may also use an array reference to curry arguments to the original method.
592
593 has 'thing' => (
594 ...
595 handles => { set_foo => [ set => 'foo' ] },
596 );
597
598 # $self->set_foo(...) calls $self->thing->set('foo', ...)
599
600The first element of the array reference is the original method name, and the
601rest is a list of curried arguments.
602
603=item C<REGEXP>
604
605The regexp option works very similar to the ARRAY option, except that it builds
606the list of methods for you. It starts by collecting all possible methods of the
607class being delegated to, then filters that list using the regexp supplied here.
608
609B<NOTE:> An I<isa> option is required when using the regexp option format. This
610is so that we can determine (at compile time) the method list from the class.
611Without an I<isa> this is just not possible.
612
613=item C<ROLE> or C<ROLETYPE>
614
615With the role option, you specify the name of a role or a
616L<role type|Moose::Meta::TypeConstraint::Role> whose "interface" then becomes
617the list of methods to handle. The "interface" can be defined as; the methods
618of the role and any required methods of the role. It should be noted that this
619does B<not> include any method modifiers or generated attribute methods (which
620is consistent with role composition).
621
622=item C<DUCKTYPE>
623
624With the duck type option, you pass a duck type object whose "interface" then
625becomes the list of methods to handle. The "interface" can be defined as the
626list of methods passed to C<duck_type> to create a duck type object. For more
627information on C<duck_type> please check
628L<Moose::Util::TypeConstraints>.
629
630=item C<CODE>
631
632This is the option to use when you really want to do something funky. You should
633only use it if you really know what you are doing, as it involves manual
634metaclass twiddling.
635
636This takes a code reference, which should expect two arguments. The first is the
637attribute meta-object this I<handles> is attached to. The second is the
638metaclass of the class being delegated to. It expects you to return a hash (not
639a HASH ref) of the methods you want mapped.
640
641=back
642
643=item I<traits =E<gt> [ @role_names ]>
644
645This tells Moose to take the list of C<@role_names> and apply them to the
646attribute meta-object. Custom attribute metaclass traits are useful for
647extending the capabilities of the I<has> keyword: they are the simplest way to
648extend the MOP, but they are still a fairly advanced topic and too much to
649cover here.
650
651See L<Metaclass and Trait Name Resolution> for details on how a trait name is
652resolved to a role name.
653
654Also see L<Moose::Cookbook::Meta::Labeled_AttributeTrait> for a metaclass
655trait example.
656
657=item I<builder> => Str
658
659The value of this key is the name of the method that will be called to obtain
660the value used to initialize the attribute. See the L<builder option docs in
661Class::MOP::Attribute|Class::MOP::Attribute/builder> and/or
662L<Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild> for more
663information.
664
665=item I<default> => SCALAR | CODE
666
667The value of this key is the default value which will initialize the attribute.
668
669NOTE: If the value is a simple scalar (string or number), then it can
670be just passed as is. However, if you wish to initialize it with a
671HASH or ARRAY ref, then you need to wrap that inside a CODE reference.
672See the L<default option docs in
673Class::MOP::Attribute|Class::MOP::Attribute/default> for more
674information.
675
676=item I<clearer> => Str
677
678Creates a method allowing you to clear the value. See the L<clearer option
679docs in Class::MOP::Attribute|Class::MOP::Attribute/clearer> for more
680information.
681
682=item I<predicate> => Str
683
684Creates a method to perform a basic test to see if a value has been set in the
685attribute. See the L<predicate option docs in
686Class::MOP::Attribute|Class::MOP::Attribute/predicate> for more information.
687
688Note that the predicate will return true even for a C<weak_ref> attribute
689whose value has expired.
690
691=item I<documentation> => $string
692
693An arbitrary string that can be retrieved later by calling C<<
694$attr->documentation >>.
695
696=back
697
698=item B<has +$name =E<gt> %options>
699
700This is variation on the normal attribute creator C<has> which allows you to
701clone and extend an attribute from a superclass or from a role. Here is an
702example of the superclass usage:
703
704 package Foo;
705 use Moose;
706
707 has 'message' => (
708 is => 'rw',
709 isa => 'Str',
710 default => 'Hello, I am a Foo'
711 );
712
713 package My::Foo;
714 use Moose;
715
716 extends 'Foo';
717
718 has '+message' => (default => 'Hello I am My::Foo');
719
720What is happening here is that B<My::Foo> is cloning the C<message> attribute
721from its parent class B<Foo>, retaining the C<is =E<gt> 'rw'> and C<isa =E<gt>
722'Str'> characteristics, but changing the value in C<default>.
723
724Here is another example, but within the context of a role:
725
726 package Foo::Role;
727 use Moose::Role;
728
729 has 'message' => (
730 is => 'rw',
731 isa => 'Str',
732 default => 'Hello, I am a Foo'
733 );
734
735 package My::Foo;
736 use Moose;
737
738 with 'Foo::Role';
739
740 has '+message' => (default => 'Hello I am My::Foo');
741
742In this case, we are basically taking the attribute which the role supplied
743and altering it within the bounds of this feature.
744
745Note that you can only extend an attribute from either a superclass or a role,
746you cannot extend an attribute in a role that composes over an attribute from
747another role.
748
749Aside from where the attributes come from (one from superclass, the other
750from a role), this feature works exactly the same. This feature is restricted
751somewhat, so as to try and force at least I<some> sanity into it. Most options work the same, but there are some exceptions:
752
753=over 4
754
755=item I<reader>
756
757=item I<writer>
758
759=item I<accessor>
760
761=item I<clearer>
762
763=item I<predicate>
764
765These options can be added, but cannot override a superclass definition.
766
767=item I<traits>
768
769You are allowed to B<add> additional traits to the C<traits> definition.
770These traits will be composed into the attribute, but preexisting traits
771B<are not> overridden, or removed.
772
773=back
774
775=item B<before $name|@names|\@names|qr/.../ =E<gt> sub { ... }>
776
777=item B<after $name|@names|\@names|qr/.../ =E<gt> sub { ... }>
778
779=item B<around $name|@names|\@names|qr/.../ =E<gt> sub { ... }>
780
781These three items are syntactic sugar for the before, after, and around method
782modifier features that L<Class::MOP> provides. More information on these may be
783found in L<Moose::Manual::MethodModifiers> and the
784L<Class::MOP::Class documentation|Class::MOP::Class/"Method Modifiers">.
785
786=item B<override ($name, &sub)>
787
788An C<override> method is a way of explicitly saying "I am overriding this
789method from my superclass". You can call C<super> within this method, and
790it will work as expected. The same thing I<can> be accomplished with a normal
791method call and the C<SUPER::> pseudo-package; it is really your choice.
792
793=item B<super>
794
795The keyword C<super> is a no-op when called outside of an C<override> method. In
796the context of an C<override> method, it will call the next most appropriate
797superclass method with the same arguments as the original method.
798
799=item B<augment ($name, &sub)>
800
801An C<augment> method, is a way of explicitly saying "I am augmenting this
802method from my superclass". Once again, the details of how C<inner> and
803C<augment> work is best described in the
804L<Moose::Cookbook::Basics::Document_AugmentAndInner>.
805
806=item B<inner>
807
808The keyword C<inner>, much like C<super>, is a no-op outside of the context of
809an C<augment> method. You can think of C<inner> as being the inverse of
810C<super>; the details of how C<inner> and C<augment> work is best described in
811the L<Moose::Cookbook::Basics::Document_AugmentAndInner>.
812
813=item B<blessed>
814
815This is the C<Scalar::Util::blessed> function. It is highly recommended that
816this is used instead of C<ref> anywhere you need to test for an object's class
817name.
818
819=item B<confess>
820
821This is the C<Carp::confess> function, and exported here for historical
822reasons.
823
824=back
825
826=head1 METACLASS
827
828When you use Moose, you can specify traits which will be applied to your
829metaclass:
830
831 use Moose -traits => 'My::Trait';
832
833This is very similar to the attribute traits feature. When you do
834this, your class's C<meta> object will have the specified traits
835applied to it. See L<Metaclass and Trait Name Resolution> for more
836details.
837
838=head2 Metaclass and Trait Name Resolution
839
840By default, when given a trait name, Moose simply tries to load a
841class of the same name. If such a class does not exist, it then looks
842for for a class matching
843B<Moose::Meta::$type::Custom::Trait::$trait_name>. The C<$type>
844variable here will be one of B<Attribute> or B<Class>, depending on
845what the trait is being applied to.
846
847If a class with this long name exists, Moose checks to see if it has
848the method C<register_implementation>. This method is expected to
849return the I<real> class name of the trait. If there is no
850C<register_implementation> method, it will fall back to using
851B<Moose::Meta::$type::Custom::Trait::$trait> as the trait name.
852
853The lookup method for metaclasses is the same, except that it looks
854for a class matching B<Moose::Meta::$type::Custom::$metaclass_name>.
855
856If all this is confusing, take a look at
857L<Moose::Cookbook::Meta::Labeled_AttributeTrait>, which demonstrates how to
858create an attribute trait.
859
860=head1 UNIMPORTING FUNCTIONS
861
862=head2 B<unimport>
863
864Moose offers a way to remove the keywords it exports, through the C<unimport>
865method. You simply have to say C<no Moose> at the bottom of your code for this
866to work. Here is an example:
867
868 package Person;
869 use Moose;
870
871 has 'first_name' => (is => 'rw', isa => 'Str');
872 has 'last_name' => (is => 'rw', isa => 'Str');
873
874 sub full_name {
875 my $self = shift;
876 $self->first_name . ' ' . $self->last_name
877 }
878
879 no Moose; # keywords are removed from the Person package
880
881=head1 EXTENDING AND EMBEDDING MOOSE
882
883To learn more about extending Moose, we recommend checking out the
884"Extending" recipes in the L<Moose::Cookbook>, starting with
885L<Moose::Cookbook::Extending::ExtensionOverview>, which provides an overview of
886all the different ways you might extend Moose. L<Moose::Exporter> and
887L<Moose::Util::MetaRole> are the modules which provide the majority of the
888extension functionality, so reading their documentation should also be helpful.
889
890=head2 The MooseX:: namespace
891
892Generally if you're writing an extension I<for> Moose itself you'll want
893to put your extension in the C<MooseX::> namespace. This namespace is
894specifically for extensions that make Moose better or different in some
895fundamental way. It is traditionally B<not> for a package that just happens
896to use Moose. This namespace follows from the examples of the C<LWPx::>
897and C<DBIx::> namespaces that perform the same function for C<LWP> and C<DBI>
898respectively.
899
900=head1 METACLASS COMPATIBILITY AND MOOSE
901
902Metaclass compatibility is a thorny subject. You should start by
903reading the "About Metaclass compatibility" section in the
904C<Class::MOP> docs.
905
906Moose will attempt to resolve a few cases of metaclass incompatibility
907when you set the superclasses for a class, in addition to the cases that
908C<Class::MOP> handles.
909
910Moose tries to determine if the metaclasses only "differ by roles". This
911means that the parent and child's metaclass share a common ancestor in
912their respective hierarchies, and that the subclasses under the common
913ancestor are only different because of role applications. This case is
914actually fairly common when you mix and match various C<MooseX::*>
915modules, many of which apply roles to the metaclass.
916
917If the parent and child do differ by roles, Moose replaces the
918metaclass in the child with a newly created metaclass. This metaclass
919is a subclass of the parent's metaclass which does all of the roles that
920the child's metaclass did before being replaced. Effectively, this
921means the new metaclass does all of the roles done by both the
922parent's and child's original metaclasses.
923
924Ultimately, this is all transparent to you except in the case of an
925unresolvable conflict.
926
927=head1 CAVEATS
928
929=over 4
930
931=item *
932
933It should be noted that C<super> and C<inner> B<cannot> be used in the same
934method. However, they may be combined within the same class hierarchy; see
935F<t/basics/override_augment_inner_super.t> for an example.
936
937The reason for this is that C<super> is only valid within a method
938with the C<override> modifier, and C<inner> will never be valid within an
939C<override> method. In fact, C<augment> will skip over any C<override> methods
940when searching for its appropriate C<inner>.
941
942This might seem like a restriction, but I am of the opinion that keeping these
943two features separate (yet interoperable) actually makes them easy to use, since
944their behavior is then easier to predict. Time will tell whether I am right or
945not (UPDATE: so far so good).
946
947=back
948
949=head1 GETTING HELP
950
951We offer both a mailing list and a very active IRC channel.
952
953The mailing list is L<mailto:moose@perl.org>. You must be subscribed to send
954a message. To subscribe, send an empty message to
955L<mailto:moose-subscribe@perl.org>
956
957You can also visit us at C<#moose> on L<irc://irc.perl.org/#moose>
958This channel is quite active, and questions at all levels (on Moose-related
959topics ;) are welcome.
960
961=head1 ACKNOWLEDGEMENTS
962
963=over 4
964
965=item I blame Sam Vilain for introducing me to the insanity that is meta-models.
966
967=item I blame Audrey Tang for then encouraging my meta-model habit in #perl6.
968
969=item Without Yuval "nothingmuch" Kogman this module would not be possible,
970and it certainly wouldn't have this name ;P
971
972=item The basis of the TypeContraints module was Rob Kinyon's idea
973originally, I just ran with it.
974
975=item Thanks to mst & chansen and the whole #moose posse for all the
976early ideas/feature-requests/encouragement/bug-finding.
977
978=item Thanks to David "Theory" Wheeler for meta-discussions and spelling fixes.
979
980=back
981
982=head1 SEE ALSO
983
984=over 4
985
986=item L<http://www.iinteractive.com/moose>
987
988This is the official web home of Moose. It contains links to our public git
989repository, as well as links to a number of talks and articles on Moose and
990Moose related technologies.
991
992=item the L<Moose manual|Moose::Manual>
993
994This is an introduction to Moose which covers most of the basics.
995
996=item Modern Perl, by chromatic
997
998This is an introduction to modern Perl programming, which includes a section on
999Moose. It is available in print and as a free download from
1000L<http://onyxneon.com/books/modern_perl/>.
1001
1002=item The Moose is flying, a tutorial by Randal Schwartz
1003
1004Part 1 - L<http://www.stonehenge.com/merlyn/LinuxMag/col94.html>
1005
1006Part 2 - L<http://www.stonehenge.com/merlyn/LinuxMag/col95.html>
1007
1008=item Several Moose extension modules in the C<MooseX::> namespace.
1009
1010See L<http://search.cpan.org/search?query=MooseX::> for extensions.
1011
1012=back
1013
1014=head2 Books
1015
1016=over 4
1017
1018=item The Art of the MetaObject Protocol
1019
1020I mention this in the L<Class::MOP> docs too, as this book was critical in
1021the development of both modules and is highly recommended.
1022
1023=back
1024
1025=head2 Papers
1026
1027=over 4
1028
1029=item L<http://www.cs.utah.edu/plt/publications/oopsla04-gff.pdf>
1030
1031This paper (suggested by lbr on #moose) was what lead to the implementation
1032of the C<super>/C<override> and C<inner>/C<augment> features. If you really
1033want to understand them, I suggest you read this.
1034
1035=back
1036
1037=head1 BUGS
1038
1039All complex software has bugs lurking in it, and this module is no
1040exception.
1041
1042Please report any bugs to C<bug-moose@rt.cpan.org>, or through the web
1043interface at L<http://rt.cpan.org>.
1044
1045You can also discuss feature requests or possible bugs on the Moose mailing
1046list (moose@perl.org) or on IRC at L<irc://irc.perl.org/#moose>.
1047
1048=head1 FEATURE REQUESTS
1049
1050We are very strict about what features we add to the Moose core, especially
1051the user-visible features. Instead we have made sure that the underlying
1052meta-system of Moose is as extensible as possible so that you can add your
1053own features easily.
1054
1055That said, occasionally there is a feature needed in the meta-system
1056to support your planned extension, in which case you should either
1057email the mailing list (moose@perl.org) or join us on IRC at
1058L<irc://irc.perl.org/#moose> to discuss. The
1059L<Moose::Manual::Contributing> has more detail about how and when you
1060can contribute.
1061
1062=head1 CABAL
1063
1064There are only a few people with the rights to release a new version
1065of Moose. The Moose Cabal are the people to go to with questions regarding
1066the wider purview of Moose. They help maintain not just the code
1067but the community as well.
1068
1069Stevan (stevan) Little E<lt>stevan@iinteractive.comE<gt>
1070
1071Jesse (doy) Luehrs E<lt>doy at tozt dot netE<gt>
1072
1073Yuval (nothingmuch) Kogman
1074
1075Shawn (sartak) Moore E<lt>sartak@bestpractical.comE<gt>
1076
1077Hans Dieter (confound) Pearcey E<lt>hdp@pobox.comE<gt>
1078
1079Chris (perigrin) Prather
1080
1081Florian Ragwitz E<lt>rafl@debian.orgE<gt>
1082
1083Dave (autarch) Rolsky E<lt>autarch@urth.orgE<gt>
1084
1085=head1 CONTRIBUTORS
1086
1087Moose is a community project, and as such, involves the work of many, many
1088members of the community beyond just the members in the cabal. In particular:
1089
1090Dave (autarch) Rolsky wrote most of the documentation in L<Moose::Manual>.
1091
1092John (jgoulah) Goulah wrote L<Moose::Cookbook::Snack::Keywords>.
1093
1094Jess (castaway) Robinson wrote L<Moose::Cookbook::Snack::Types>.
1095
1096Aran (bluefeet) Clary Deltac wrote
1097L<Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion>.
1098
1099Anders (Debolaz) Nor Berle contributed L<Test::Moose> and L<Moose::Util>.
1100
1101Also, the code in L<Moose::Meta::Attribute::Native> is based on code from the
1102L<MooseX::AttributeHelpers> distribution, which had contributions from:
1103
1104Chris (perigrin) Prather
1105
1106Cory (gphat) Watson
1107
1108Evan Carroll
1109
1110Florian (rafl) Ragwitz
1111
1112Jason May
1113
1114Jay Hannah
1115
1116Jesse (doy) Luehrs
1117
1118Paul (frodwith) Driver
1119
1120Robert (rlb3) Boone
1121
1122Robert Buels
1123
1124Robert (phaylon) Sedlacek
1125
1126Shawn (Sartak) Moore
1127
1128Stevan Little
1129
1130Tom (dec) Lanyon
1131
1132Yuval Kogman
1133
1134Finally, these people also contributed various tests, bug fixes,
1135documentation, and features to the Moose codebase:
1136
1137Aankhen
1138
1139Adam (Alias) Kennedy
1140
1141Christian (chansen) Hansen
1142
1143Cory (gphat) Watson
1144
1145Dylan Hardison (doc fixes)
1146
1147Eric (ewilhelm) Wilhelm
1148
1149Evan Carroll
1150
1151Guillermo (groditi) Roditi
1152
1153Jason May
1154
1155Jay Hannah
1156
1157Jonathan (jrockway) Rockway
1158
1159Matt (mst) Trout
1160
1161Nathan (kolibrie) Gray
1162
1163Paul (frodwith) Driver
1164
1165Piotr (dexter) Roszatycki
1166
1167Robert Buels
1168
1169Robert (phaylon) Sedlacek
1170
1171Robert (rlb3) Boone
1172
1173Sam (mugwump) Vilain
1174
1175Scott (konobi) McWhirter
1176
1177Shlomi (rindolf) Fish
1178
1179Tom (dec) Lanyon
1180
1181Wallace (wreis) Reis
1182
1183... and many other #moose folks
1184
1185=head1 AUTHOR
1186
1187Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details.
1188
1189=head1 COPYRIGHT AND LICENSE
1190
1191This software is copyright (c) 2012 by Infinity Interactive, Inc..
1192
1193This is free software; you can redistribute it and/or modify it under
1194the same terms as the Perl 5 programming language system itself.
1195
1196=cut
1197
1198
1199__END__
 
# spent 211µs within Moose::bootstrap which was called: # once (211µs+0s) by DynaLoader::bootstrap at line 223 of DynaLoader.pm
sub Moose::bootstrap; # xsub