← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:29 2010

File /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Class/MOP/Mixin/AttributeCore.pm
Statements Executed 11477
Statement Execution Time 21.2ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
40381054.83ms4.83msClass::MOP::Mixin::AttributeCore::::init_argClass::MOP::Mixin::AttributeCore::init_arg
65517122.96ms20.7msClass::MOP::Mixin::AttributeCore::::defaultClass::MOP::Mixin::AttributeCore::default
412026112.13ms2.13msClass::MOP::Mixin::AttributeCore::::nameClass::MOP::Mixin::AttributeCore::name (xsub)
1060441.51ms1.51msClass::MOP::Mixin::AttributeCore::::has_initializerClass::MOP::Mixin::AttributeCore::has_initializer
669551.40ms1.40msClass::MOP::Mixin::AttributeCore::::is_default_a_coderefClass::MOP::Mixin::AttributeCore::is_default_a_coderef
111974µs1.49msClass::MOP::Mixin::AttributeCore::::BEGIN@12Class::MOP::Mixin::AttributeCore::BEGIN@12
37995452µs452µsClass::MOP::Mixin::AttributeCore::::has_defaultClass::MOP::Mixin::AttributeCore::has_default
27011424µs424µsClass::MOP::Mixin::AttributeCore::::has_writerClass::MOP::Mixin::AttributeCore::has_writer
27011395µs395µsClass::MOP::Mixin::AttributeCore::::has_accessorClass::MOP::Mixin::AttributeCore::has_accessor
27011356µs356µsClass::MOP::Mixin::AttributeCore::::has_readerClass::MOP::Mixin::AttributeCore::has_reader
33311338µs338µsClass::MOP::Mixin::AttributeCore::::definition_contextClass::MOP::Mixin::AttributeCore::definition_context
24721337µs337µsClass::MOP::Mixin::AttributeCore::::readerClass::MOP::Mixin::AttributeCore::reader
27011335µs335µsClass::MOP::Mixin::AttributeCore::::has_predicateClass::MOP::Mixin::AttributeCore::has_predicate
24511325µs325µsClass::MOP::Mixin::AttributeCore::::_set_insertion_orderClass::MOP::Mixin::AttributeCore::_set_insertion_order
27011321µs321µsClass::MOP::Mixin::AttributeCore::::has_clearerClass::MOP::Mixin::AttributeCore::has_clearer
21764238µs238µsClass::MOP::Mixin::AttributeCore::::has_builderClass::MOP::Mixin::AttributeCore::has_builder
8331135µs135µsClass::MOP::Mixin::AttributeCore::::accessorClass::MOP::Mixin::AttributeCore::accessor
541180µs80µsClass::MOP::Mixin::AttributeCore::::predicateClass::MOP::Mixin::AttributeCore::predicate
91126µs26µsClass::MOP::Mixin::AttributeCore::::builderClass::MOP::Mixin::AttributeCore::builder
11117µs24µsClass::MOP::Mixin::AttributeCore::::BEGIN@3Class::MOP::Mixin::AttributeCore::BEGIN@3
102116µs16µsClass::MOP::Mixin::AttributeCore::::writerClass::MOP::Mixin::AttributeCore::writer
11111µs54µsClass::MOP::Mixin::AttributeCore::::BEGIN@10Class::MOP::Mixin::AttributeCore::BEGIN@10
1119µs31µsClass::MOP::Mixin::AttributeCore::::BEGIN@4Class::MOP::Mixin::AttributeCore::BEGIN@4
3116µs6µsClass::MOP::Mixin::AttributeCore::::clearerClass::MOP::Mixin::AttributeCore::clearer
0000s0sClass::MOP::Mixin::AttributeCore::::has_init_argClass::MOP::Mixin::AttributeCore::has_init_arg
0000s0sClass::MOP::Mixin::AttributeCore::::has_insertion_orderClass::MOP::Mixin::AttributeCore::has_insertion_order
0000s0sClass::MOP::Mixin::AttributeCore::::has_read_methodClass::MOP::Mixin::AttributeCore::has_read_method
0000s0sClass::MOP::Mixin::AttributeCore::::has_write_methodClass::MOP::Mixin::AttributeCore::has_write_method
0000s0sClass::MOP::Mixin::AttributeCore::::initializerClass::MOP::Mixin::AttributeCore::initializer
0000s0sClass::MOP::Mixin::AttributeCore::::insertion_orderClass::MOP::Mixin::AttributeCore::insertion_order
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Class::MOP::Mixin::AttributeCore;
2
3328µs231µs
# spent 24µs (17+7) within Class::MOP::Mixin::AttributeCore::BEGIN@3 which was called # once (17µs+7µs) by Class::MOP::BEGIN@15 at line 3
use strict;
# spent 24µs making 1 call to Class::MOP::Mixin::AttributeCore::BEGIN@3 # spent 7µs making 1 call to strict::import
4371µs252µs
# spent 31µs (9+22) within Class::MOP::Mixin::AttributeCore::BEGIN@4 which was called # once (9µs+22µs) by Class::MOP::BEGIN@15 at line 4
use warnings;
# spent 31µs making 1 call to Class::MOP::Mixin::AttributeCore::BEGIN@4 # spent 22µs making 1 call to warnings::import
5
61800nsour $VERSION = '0.98';
7119µs$VERSION = eval $VERSION;
81400nsour $AUTHORITY = 'cpan:STEVAN';
9
10328µs296µs
# spent 54µs (11+42) within Class::MOP::Mixin::AttributeCore::BEGIN@10 which was called # once (11µs+42µs) by Class::MOP::BEGIN@15 at line 10
use Scalar::Util 'blessed';
# spent 54µs making 1 call to Class::MOP::Mixin::AttributeCore::BEGIN@10 # spent 42µs making 1 call to Exporter::import
11
123552µs21.93ms
# spent 1.49ms (974µs+517µs) within Class::MOP::Mixin::AttributeCore::BEGIN@12 which was called # once (974µs+517µs) by Class::MOP::BEGIN@15 at line 12
use base 'Class::MOP::Mixin';
# spent 1.49ms making 1 call to Class::MOP::Mixin::AttributeCore::BEGIN@12 # spent 436µs making 1 call to base::import
13
14270578µs
# spent 395µs within Class::MOP::Mixin::AttributeCore::has_accessor which was called 270 times, avg 1µs/call: # 270 times (395µs+0s) by Class::MOP::Attribute::install_accessors at line 354 of Class/MOP/Attribute.pm, avg 1µs/call
sub has_accessor { defined $_[0]->{'accessor'} }
15270530µs
# spent 356µs within Class::MOP::Mixin::AttributeCore::has_reader which was called 270 times, avg 1µs/call: # 270 times (356µs+0s) by Class::MOP::Attribute::install_accessors at line 358 of Class/MOP/Attribute.pm, avg 1µs/call
sub has_reader { defined $_[0]->{'reader'} }
16270589µs
# spent 424µs within Class::MOP::Mixin::AttributeCore::has_writer which was called 270 times, avg 2µs/call: # 270 times (424µs+0s) by Class::MOP::Attribute::install_accessors at line 362 of Class/MOP/Attribute.pm, avg 2µs/call
sub has_writer { defined $_[0]->{'writer'} }
17270517µs
# spent 335µs within Class::MOP::Mixin::AttributeCore::has_predicate which was called 270 times, avg 1µs/call: # 270 times (335µs+0s) by Class::MOP::Attribute::install_accessors at line 366 of Class/MOP/Attribute.pm, avg 1µs/call
sub has_predicate { defined $_[0]->{'predicate'} }
18270552µs
# spent 321µs within Class::MOP::Mixin::AttributeCore::has_clearer which was called 270 times, avg 1µs/call: # 270 times (321µs+0s) by Class::MOP::Attribute::install_accessors at line 370 of Class/MOP/Attribute.pm, avg 1µs/call
sub has_clearer { defined $_[0]->{'clearer'} }
19217397µs
# spent 238µs within Class::MOP::Mixin::AttributeCore::has_builder which was called 217 times, avg 1µs/call: # 180 times (197µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 136 of Class/MOP/Method/Constructor.pm, avg 1µs/call # 21 times (21µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 205 of Moose/Meta/Method/Constructor.pm, avg 995ns/call # 12 times (15µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 200 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 2 times (3µs+0s) by Moose::Meta::Attribute::initialize_instance_slot at line 386 of Moose/Meta/Attribute.pm, avg 1µs/call # once (2µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 166 of Moose/Meta/Method/Accessor.pm # once (800ns+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 167 of Moose/Meta/Method/Accessor.pm
sub has_builder { defined $_[0]->{'builder'} }
20sub has_init_arg { defined $_[0]->{'init_arg'} }
21379801µs
# spent 452µs within Class::MOP::Mixin::AttributeCore::has_default which was called 379 times, avg 1µs/call: # 267 times (291µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 136 of Class/MOP/Method/Constructor.pm, avg 1µs/call # 32 times (37µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 205 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 21 times (42µs+0s) by Moose::Meta::Attribute::initialize_instance_slot at line 386 of Moose/Meta/Attribute.pm, avg 2µs/call # 17 times (32µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 166 of Moose/Meta/Method/Accessor.pm, avg 2µs/call # 17 times (16µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 167 of Moose/Meta/Method/Accessor.pm, avg 912ns/call # 12 times (13µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 200 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 7 times (8µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 216 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 5 times (10µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 186 of Moose/Meta/Method/Accessor.pm, avg 2µs/call # once (3µs+0s) by MooseX::ClassAttribute::Role::Meta::Attribute::_initialize at line 61 of MooseX/ClassAttribute/Role/Meta/Attribute.pm
sub has_default { defined $_[0]->{'default'} }
2210602.33ms
# spent 1.51ms within Class::MOP::Mixin::AttributeCore::has_initializer which was called 1060 times, avg 1µs/call: # 664 times (871µs+0s) by Class::MOP::Attribute::_set_initial_slot_value at line 146 of Class/MOP/Attribute.pm, avg 1µs/call # 335 times (553µs+0s) by Moose::Meta::Attribute::_set_initial_slot_value at line 437 of Moose/Meta/Attribute.pm, avg 2µs/call # 39 times (48µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_assignment at line 266 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 22 times (36µs+0s) by Moose::Meta::Method::Accessor::_inline_init_slot at line 206 of Moose/Meta/Method/Accessor.pm, avg 2µs/call
sub has_initializer { defined $_[0]->{'initializer'} }
23sub has_insertion_order { defined $_[0]->{'insertion_order'} }
24
2583200µs
# spent 135µs within Class::MOP::Mixin::AttributeCore::accessor which was called 83 times, avg 2µs/call: # 52 times (71µs+0s) by Class::MOP::Attribute::install_accessors at line 354 of Class/MOP/Attribute.pm, avg 1µs/call # 29 times (60µs+0s) by Class::MOP::Attribute::get_read_method at line 164 of Class/MOP/Attribute.pm, avg 2µs/call # 2 times (4µs+0s) by Class::MOP::Attribute::get_write_method at line 174 of Class/MOP/Attribute.pm, avg 2µs/call
sub accessor { $_[0]->{'accessor'} }
26247506µs
# spent 337µs within Class::MOP::Mixin::AttributeCore::reader which was called 247 times, avg 1µs/call: # 216 times (275µs+0s) by Class::MOP::Attribute::install_accessors at line 358 of Class/MOP/Attribute.pm, avg 1µs/call # 31 times (63µs+0s) by Class::MOP::Attribute::get_read_method at line 164 of Class/MOP/Attribute.pm, avg 2µs/call
sub reader { $_[0]->{'reader'} }
271031µs
# spent 16µs within Class::MOP::Mixin::AttributeCore::writer which was called 10 times, avg 2µs/call: # 8 times (12µs+0s) by Class::MOP::Attribute::install_accessors at line 362 of Class/MOP/Attribute.pm, avg 1µs/call # 2 times (4µs+0s) by Class::MOP::Attribute::get_write_method at line 174 of Class/MOP/Attribute.pm, avg 2µs/call
sub writer { $_[0]->{'writer'} }
2854124µs
# spent 80µs within Class::MOP::Mixin::AttributeCore::predicate which was called 54 times, avg 1µs/call: # 54 times (80µs+0s) by Class::MOP::Attribute::install_accessors at line 366 of Class/MOP/Attribute.pm, avg 1µs/call
sub predicate { $_[0]->{'predicate'} }
29311µs
# spent 6µs within Class::MOP::Mixin::AttributeCore::clearer which was called 3 times, avg 2µs/call: # 3 times (6µs+0s) by Class::MOP::Attribute::install_accessors at line 370 of Class/MOP/Attribute.pm, avg 2µs/call
sub clearer { $_[0]->{'clearer'} }
30942µs
# spent 26µs within Class::MOP::Mixin::AttributeCore::builder which was called 9 times, avg 3µs/call: # 9 times (26µs+0s) by SimpleDB::Class::Item::id at line 388 of accessor id defined at ../lib/SimpleDB/Class/Item.pm, avg 3µs/call
sub builder { $_[0]->{'builder'} }
3140387.62ms
# spent 4.83ms within Class::MOP::Mixin::AttributeCore::init_arg which was called 4038 times, avg 1µs/call: # 2472 times (2.73ms+0s) by Moose::Meta::Attribute::new at line 58 of Moose/Meta/Attribute.pm, avg 1µs/call # 770 times (911µs+0s) by Class::MOP::Class::_clone_instance at line 422 of Class/MOP/Class.pm, avg 1µs/call # 415 times (761µs+0s) by Moose::Meta::Attribute::initialize_instance_slot at line 368 of Moose/Meta/Attribute.pm, avg 2µs/call # 267 times (295µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 159 of Class/MOP/Method/Constructor.pm, avg 1µs/call # 44 times (56µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 200 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 30 times (37µs+0s) by Moose::Meta::Class::new_object at line 261 of Moose/Meta/Class.pm, avg 1µs/call # 25 times (23µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 205 of Moose/Meta/Method/Constructor.pm, avg 904ns/call # 7 times (8µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 231 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 7 times (6µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 207 of Moose/Meta/Method/Constructor.pm, avg 900ns/call # once (2µs+0s) by Moose::Meta::Method::Constructor::_generate_triggers at line 167 of Moose/Meta/Method/Constructor.pm
sub init_arg { $_[0]->{'init_arg'} }
32sub initializer { $_[0]->{'initializer'} }
33333629µs
# spent 338µs within Class::MOP::Mixin::AttributeCore::definition_context which was called 333 times, avg 1µs/call: # 333 times (338µs+0s) by Class::MOP::Attribute::_process_accessors at line 302 of Class/MOP/Attribute.pm, avg 1µs/call
sub definition_context { $_[0]->{'definition_context'} }
34sub insertion_order { $_[0]->{'insertion_order'} }
35245482µs
# spent 325µs within Class::MOP::Mixin::AttributeCore::_set_insertion_order which was called 245 times, avg 1µs/call: # 245 times (325µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 36 of Class/MOP/Mixin/HasAttributes.pm, avg 1µs/call
sub _set_insertion_order { $_[0]->{'insertion_order'} = $_[1] }
36
37sub has_read_method { $_[0]->has_reader || $_[0]->has_accessor }
38sub has_write_method { $_[0]->has_writer || $_[0]->has_accessor }
39
40
# spent 1.40ms within Class::MOP::Mixin::AttributeCore::is_default_a_coderef which was called 669 times, avg 2µs/call: # 506 times (988µs+0s) by Class::MOP::Mixin::AttributeCore::default at line 53, avg 2µs/call # 87 times (175µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 143 of Class/MOP/Method/Constructor.pm, avg 2µs/call # 68 times (215µs+0s) by Class::MOP::Attribute::new at line 47 of Class/MOP/Attribute.pm, avg 3µs/call # 7 times (16µs+0s) by Moose::Meta::Method::Constructor::_generate_default_value at line 344 of Moose/Meta/Method/Constructor.pm, avg 2µs/call # once (4µs+0s) by Class::MOP::Class:::around at line 78 of MooseX/ClassAttribute/Role/Meta/Attribute.pm
sub is_default_a_coderef {
41 # Uber hack because it is called from CMOP::Attribute constructor as
42 # $class->is_default_a_coderef(\%options)
4317671.99ms my ($value) = ref $_[0] ? $_[0]->{'default'} : $_[1]->{'default'};
44
45 return unless ref($value);
46
47 return ref($value) eq 'CODE'
48 || ( blessed($value) && $value->isa('Class::MOP::Method') );
49}
50
51
# spent 20.7ms (2.96+17.8) within Class::MOP::Mixin::AttributeCore::default which was called 655 times, avg 32µs/call: # 446 times (2.21ms+1.32ms) by Class::MOP::Attribute::initialize_instance_slot at line 113 of Class/MOP/Attribute.pm, avg 8µs/call # 58 times (89µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 145 of Class/MOP/Method/Constructor.pm, avg 2µs/call # 57 times (126µs+0s) by Class::MOP::Class::_immutable_metaclass at line 939 of Class/MOP/Class.pm, avg 2µs/call # 29 times (46µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 149 of Class/MOP/Method/Constructor.pm, avg 2µs/call # 25 times (165µs+3.01ms) by Foo::Domain::components or Foo::Domain::notes or Foo::Domain::properties or Foo::Domain::start_date at line 12 of generated method (unknown origin), avg 127µs/call # 19 times (141µs+71µs) by Moose::Meta::Attribute::initialize_instance_slot at line 387 of Moose/Meta/Attribute.pm, avg 11µs/call # 7 times (80µs+57µs) by SimpleDB::Class::ResultSet::new at line 74 of generated method (unknown origin), avg 20µs/call # 4 times (10µs+0s) by Moose::Meta::Method::Constructor::_generate_default_value at line 348 of Moose/Meta/Method/Constructor.pm, avg 2µs/call # 2 times (15µs+3.40ms) by MooseX::AttributeHelpers::Collection::Hash::method_constructors at line 53 of accessor method_constructors defined at MooseX/AttributeHelpers/Trait/Base.pm, avg 1.71ms/call # once (11µs+8.42ms) by SimpleDB::Class::http at line 329 of accessor http defined at ../lib/SimpleDB/Class.pm # once (13µs+1.29ms) by Foo::Domain::parent at line 11 of generated method (unknown origin) # once (6µs+114µs) by SimpleDB::Class::Cache::memcached at line 107 of accessor memcached defined at ../lib/SimpleDB/Class/Cache.pm # once (13µs+57µs) by Class::MOP::Class::__ANON__::SERIAL::1::_class_attribute_values at line 39 of accessor _class_attribute_values defined at MooseX/ClassAttribute/Role/Meta/Class.pm # once (10µs+44µs) by SimpleDB::Class::cache at line 220 of accessor cache defined at ../lib/SimpleDB/Class.pm # once (3µs+0s) by Class::MOP::Class:::around at line 76 of MooseX/ClassAttribute/Role/Meta/Attribute.pm # once (8µs+-8µs) by SimpleDB::Client::new at line 33 of generated method (unknown origin) # once (10µs+-10µs) by SimpleDB::Client::new at line 23 of generated method (unknown origin)
sub default {
5216662.58ms my ( $self, $instance ) = @_;
53 if ( defined $instance && $self->is_default_a_coderef ) {
# spent 8.42ms making 1 call to SimpleDB::Class::__ANON__[../lib/SimpleDB/Class.pm:328] # spent 5.40ms making 1 call to SimpleDB::Client::__ANON__[SimpleDB/Client.pm:125] # spent 3.39ms making 2 calls to MooseX::AttributeHelpers::Trait::Base::__ANON__[MooseX/AttributeHelpers/Trait/Base.pm:51], avg 1.70ms/call # spent 2.91ms making 5 calls to SimpleDB::Class::Item::__ANON__[../lib/SimpleDB/Class/Item.pm:87], avg 582µs/call # spent 2.89ms making 1 call to SimpleDB::Client::__ANON__[SimpleDB/Client.pm:138] # spent 1.29ms making 1 call to SimpleDB::Class::Item::__ANON__[../lib/SimpleDB/Class/Item.pm:280] # spent 988µs making 506 calls to Class::MOP::Mixin::AttributeCore::is_default_a_coderef, avg 2µs/call # spent 112µs making 1 call to SimpleDB::Class::Cache::__ANON__[../lib/SimpleDB/Class/Cache.pm:106] # spent 80µs making 32 calls to Moose::Meta::Class::__ANON__[Moose/Meta/Class.pm:29], avg 2µs/call # spent 69µs making 32 calls to Class::MOP::__ANON__[Class/MOP.pm:321], avg 2µs/call # spent 68µs making 32 calls to Class::MOP::__ANON__[Class/MOP.pm:305], avg 2µs/call # spent 65µs making 32 calls to Moose::Meta::Class::__ANON__[Moose/Meta/Class.pm:34], avg 2µs/call # spent 61µs making 32 calls to Class::MOP::__ANON__[Class/MOP.pm:286], avg 2µs/call # spent 57µs making 32 calls to Class::MOP::__ANON__[Class/MOP.pm:260], avg 2µs/call # spent 57µs making 32 calls to Class::MOP::__ANON__[Class/MOP.pm:218], avg 2µs/call # spent 53µs making 1 call to MooseX::ClassAttribute::Role::Meta::Class::__ANON__[MooseX/ClassAttribute/Role/Meta/Class.pm:37] # spent 52µs making 32 calls to Class::MOP::__ANON__[Class/MOP.pm:176], avg 2µs/call # spent 40µs making 1 call to SimpleDB::Class::__ANON__[../lib/SimpleDB/Class.pm:219] # spent 22µs making 8 calls to SimpleDB::Class::Item::__ANON__[../lib/SimpleDB/Class/Item.pm:90], avg 3µs/call # spent 20µs making 7 calls to SimpleDB::Class::ResultSet::__ANON__[../lib/SimpleDB/Class/ResultSet.pm:109], avg 3µs/call # spent 11µs making 4 calls to SimpleDB::Class::Item::__ANON__[../lib/SimpleDB/Class/Item.pm:92], avg 3µs/call # spent 10µs making 4 calls to Class::MOP::__ANON__[Class/MOP.pm:494], avg 2µs/call # spent 6µs making 2 calls to MooseX::ClassAttribute::Role::Meta::Class::__ANON__[MooseX/ClassAttribute/Role/Meta/Class.pm:23], avg 3µs/call # spent 5µs making 2 calls to MooseX::AttributeHelpers::Trait::Base::__ANON__[MooseX/AttributeHelpers/Trait/Base.pm:22], avg 2µs/call # spent 3µs making 1 call to Moose::Meta::TypeCoercion::__ANON__[Moose/Meta/TypeCoercion.pm:17] # spent 2µs making 1 call to Moose::Meta::TypeConstraint::Registry::__ANON__[Moose/Meta/TypeConstraint/Registry.pm:24]
54 # if the default is a CODE ref, then we pass in the instance and
55 # default can return a value based on that instance. Somewhat crude,
56 # but works.
57 return $self->{'default'}->($instance);
58 }
59 $self->{'default'};
60}
61
6215µs1;
63
64__END__
65
66=pod
67
68=head1 NAME
69
70Class::MOP::Mixin::AttributeCore - Core attributes shared by attribute metaclasses
71
72=head1 DESCRIPTION
73
74This class implements the core attributes (aka properties) shared by all
75attributes. See the L<Class::MOP::Attribute> documentation for API details.
76
77=head1 AUTHORS
78
79Dave Rolsky E<lt>autarch@urth.orgE<gt>
80
81=head1 COPYRIGHT AND LICENSE
82
83Copyright 2006-2010 by Infinity Interactive, Inc.
84
85L<http://www.iinteractive.com>
86
87This library is free software; you can redistribute it and/or modify
88it under the same terms as Perl itself.
89
90=cut
# spent 2.13ms within Class::MOP::Mixin::AttributeCore::name which was called 4120 times, avg 518ns/call: # 1810 times (726µs+0s) by Class::MOP::Attribute::slots at line 224 of Class/MOP/Attribute.pm, avg 401ns/call # 664 times (352µs+0s) by Class::MOP::Attribute::_set_initial_slot_value at line 144 of Class/MOP/Attribute.pm, avg 530ns/call # 343 times (160µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 159 of Class/MOP/Method/Constructor.pm, avg 468ns/call # 335 times (261µs+0s) by Moose::Meta::Attribute::_set_initial_slot_value at line 435 of Moose/Meta/Attribute.pm, avg 778ns/call # 290 times (182µs+0s) by Class::MOP::Attribute::set_raw_value at line 264 of Class/MOP/Attribute.pm, avg 628ns/call # 245 times (177µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 30 of Class/MOP/Mixin/HasAttributes.pm, avg 722ns/call # 106 times (62µs+0s) by Class::MOP::Attribute::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Class/MOP/Attribute.pm:340] at line 325 of Class/MOP/Attribute.pm, avg 587ns/call # 52 times (36µs+0s) by Class::MOP::Method::Accessor::_generate_reader_method_inline at line 154 of Class/MOP/Method/Accessor.pm, avg 687ns/call # 39 times (20µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_assignment at line 272 of Moose/Meta/Method/Constructor.pm, avg 515ns/call # 37 times (34µs+0s) by Moose::Meta::Role::Attribute::attribute_for_class at line 67 of Moose/Meta/Role/Attribute.pm, avg 927ns/call # 35 times (23µs+0s) by Moose::Meta::Method::Accessor::_inline_check_constraint at line 130 of Moose/Meta/Method/Accessor.pm, avg 654ns/call # 32 times (20µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 196 of Moose/Meta/Method/Constructor.pm, avg 613ns/call # 31 times (19µs+0s) by Class::MOP::Method::Accessor::_generate_predicate_method_inline at line 189 of Class/MOP/Method/Accessor.pm, avg 629ns/call # 30 times (22µs+0s) by Moose::Meta::Role::Attribute::clone at line 73 of Moose/Meta/Role/Attribute.pm, avg 727ns/call # 15 times (10µs+0s) by Class::MOP::Method::Accessor::_generate_accessor_method_inline at line 135 of Class/MOP/Method/Accessor.pm, avg 673ns/call # 15 times (7µs+0s) by Moose::Meta::Method::Constructor::_generate_type_constraint_check at line 328 of Moose/Meta/Method/Constructor.pm, avg 433ns/call # 12 times (5µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 200 of Moose/Meta/Method/Constructor.pm, avg 425ns/call # 11 times (6µs+0s) by Moose::Meta::Attribute::_weaken_value at line 492 of Moose/Meta/Attribute.pm, avg 555ns/call # 6 times (3µs+0s) by Class::MOP::Attribute::get_raw_value at line 272 of Class/MOP/Attribute.pm, avg 567ns/call # 3 times (2µs+0s) by Class::MOP::Method::Accessor::_generate_clearer_method_inline at line 206 of Class/MOP/Method/Accessor.pm, avg 633ns/call # 3 times (2µs+0s) by Class::MOP::Method::Accessor::_generate_writer_method_inline at line 172 of Class/MOP/Method/Accessor.pm, avg 600ns/call # 2 times (1µs+0s) by Class::MOP::Attribute::has_value at line 280 of Class/MOP/Attribute.pm, avg 650ns/call # once (2µs+0s) by MooseX::ClassAttribute::Role::Meta::Class::add_class_attribute at line 50 of MooseX/ClassAttribute/Role/Meta/Class.pm # once (1µs+0s) by Moose::Meta::Method::Constructor::_generate_triggers at line 171 of Moose/Meta/Method/Constructor.pm # once (1µs+0s) by Class::MOP::Class:::around at line 111 of MooseX/ClassAttribute/Role/Meta/Attribute.pm # once (500ns+0s) by Moose::Meta::Method::Accessor::_inline_get_old_value_for_trigger at line 233 of Moose/Meta/Method/Accessor.pm
sub Class::MOP::Mixin::AttributeCore::name; # xsub