← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:42:38 2010
Reported on Wed Nov 17 22:07:15 2010

Filename/home/doy/coding/src/Moose/blib/lib//Moose.pm
StatementsExecuted 1400 statements in 41.3ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2161092514.4ms4.67sMoose::::hasMoose::has
11113.9ms92.6msMoose::::BEGIN@19Moose::BEGIN@19
11112.5ms86.3msMoose::::BEGIN@27Moose::BEGIN@27
11111.9ms441msMoose::::BEGIN@15Moose::BEGIN@15
1117.12ms7.27msMoose::::BEGIN@3Moose::BEGIN@3
1116.65ms45.9msMoose::::BEGIN@20Moose::BEGIN@20
25115.86ms339msMoose::::init_metaMoose::init_meta
1115.65ms11.3msMoose::::BEGIN@30Moose::BEGIN@30
1115.60ms10.8msMoose::::BEGIN@11Moose::BEGIN@11
1114.29ms12.9msMoose::::BEGIN@31Moose::BEGIN@31
1113.75ms22.8msMoose::::BEGIN@25Moose::BEGIN@25
1113.49ms6.94msMoose::::BEGIN@32Moose::BEGIN@32
1113.20ms13.2msMoose::::BEGIN@28Moose::BEGIN@28
1112.62ms422msMoose::::BEGIN@21Moose::BEGIN@21
1112.60ms9.79msMoose::::BEGIN@29Moose::BEGIN@29
1111.57ms1.83msMoose::::BEGIN@12Moose::BEGIN@12
1111.51ms8.69msMoose::::BEGIN@38Moose::BEGIN@38
1111.47ms7.07msMoose::::BEGIN@33Moose::BEGIN@33
1111.43ms1.59msMoose::::BEGIN@2Moose::BEGIN@2
111985µs45.8msMoose::::BEGIN@14Moose::BEGIN@14
111973µs10.6msMoose::::BEGIN@23Moose::BEGIN@23
261414805µs1.88sMoose::::withMoose::with (recurses: max depth 1, inclusive time 26.4ms)
111141µs141µsMoose::::BEGIN@5Moose::BEGIN@5
22289µs11.2msMoose::::extendsMoose::extends
22276µs3.22msMoose::::beforeMoose::before
11151µs108µsMoose::::BEGIN@17Moose::BEGIN@17
11145µs8.31msMoose::::BEGIN@35Moose::BEGIN@35
11128µs28µsMoose::::BEGIN@22Moose::BEGIN@22
11124µs24µsMoose::::BEGIN@36Moose::BEGIN@36
0000s0sMoose::::_get_callerMoose::_get_caller
0000s0sMoose::::afterMoose::after
0000s0sMoose::::aroundMoose::around
0000s0sMoose::::augmentMoose::augment
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;
231.31ms21.62ms
# spent 1.59ms (1.43+167µs) within Moose::BEGIN@2 which was called: # once (1.43ms+167µs) by KiokuDB::BEGIN@4 at line 2
use strict;
# spent 1.59ms making 1 call to Moose::BEGIN@2 # spent 22µs making 1 call to strict::import
336.79ms27.35ms
# spent 7.27ms (7.12+148µs) within Moose::BEGIN@3 which was called: # once (7.12ms+148µs) by KiokuDB::BEGIN@4 at line 3
use warnings;
# spent 7.27ms making 1 call to Moose::BEGIN@3 # spent 77µs making 1 call to warnings::import
4
53313µs1141µs
# spent 141µs within Moose::BEGIN@5 which was called: # once (141µs+0s) by KiokuDB::BEGIN@4 at line 5
use 5.008;
# spent 141µs making 1 call to Moose::BEGIN@5
6
714µsour $VERSION = '1.19';
8176µs$VERSION = eval $VERSION;
# spent 76µs executing statements in string eval
914µsour $AUTHORITY = 'cpan:STEVAN';
10
113757µs211.1ms
# spent 10.8ms (5.60+5.16) within Moose::BEGIN@11 which was called: # once (5.60ms+5.16ms) by KiokuDB::BEGIN@4 at line 11
use Scalar::Util 'blessed';
# spent 10.8ms making 1 call to Moose::BEGIN@11 # spent 361µs making 1 call to Exporter::import
1231.56ms22.09ms
# spent 1.83ms (1.57+256µs) within Moose::BEGIN@12 which was called: # once (1.57ms+256µs) by KiokuDB::BEGIN@4 at line 12
use Carp 'confess';
# spent 1.83ms making 1 call to Moose::BEGIN@12 # spent 256µs making 1 call to Exporter::import
13
143469µs245.8ms
# spent 45.8ms (985µs+44.8) within Moose::BEGIN@14 which was called: # once (985µs+44.8ms) by KiokuDB::BEGIN@4 at line 14
use Moose::Deprecated;
# spent 45.8ms making 1 call to Moose::BEGIN@14 # spent 35µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:61]
153468µs2442ms
# spent 441ms (11.9+429) within Moose::BEGIN@15 which was called: # once (11.9ms+429ms) by KiokuDB::BEGIN@4 at line 15
use Moose::Exporter;
# spent 441ms making 1 call to Moose::BEGIN@15 # spent 140µs making 1 call to Moose::Exporter::import
16
173173µs2166µs
# spent 108µs (51+57) within Moose::BEGIN@17 which was called: # once (51µs+57µs) by KiokuDB::BEGIN@4 at line 17
use Class::MOP 1.10;
# spent 108µs making 1 call to Moose::BEGIN@17 # spent 57µs making 1 call to UNIVERSAL::VERSION
18
193513µs192.6ms
# spent 92.6ms (13.9+78.7) within Moose::BEGIN@19 which was called: # once (13.9ms+78.7ms) by KiokuDB::BEGIN@4 at line 19
use Moose::Meta::Class;
# spent 92.6ms making 1 call to Moose::BEGIN@19
203511µs145.9ms
# spent 45.9ms (6.65+39.3) within Moose::BEGIN@20 which was called: # once (6.65ms+39.3ms) by KiokuDB::BEGIN@4 at line 20
use Moose::Meta::TypeConstraint;
# spent 45.9ms making 1 call to Moose::BEGIN@20
213502µs1422ms
# spent 422ms (2.62+419) within Moose::BEGIN@21 which was called: # once (2.62ms+419ms) by KiokuDB::BEGIN@4 at line 21
use Moose::Meta::TypeCoercion;
# spent 422ms making 1 call to Moose::BEGIN@21
22388µs128µs
# spent 28µs within Moose::BEGIN@22 which was called: # once (28µs+0s) by KiokuDB::BEGIN@4 at line 22
use Moose::Meta::Attribute;
# spent 28µs making 1 call to Moose::BEGIN@22
233548µs110.6ms
# spent 10.6ms (973µs+9.59) within Moose::BEGIN@23 which was called: # once (973µs+9.59ms) by KiokuDB::BEGIN@4 at line 23
use Moose::Meta::Instance;
# spent 10.6ms making 1 call to Moose::BEGIN@23
24
253572µs122.8ms
# spent 22.8ms (3.75+19.1) within Moose::BEGIN@25 which was called: # once (3.75ms+19.1ms) by KiokuDB::BEGIN@4 at line 25
use Moose::Object;
# spent 22.8ms making 1 call to Moose::BEGIN@25
26
273510µs186.3ms
# spent 86.3ms (12.5+73.8) within Moose::BEGIN@27 which was called: # once (12.5ms+73.8ms) by KiokuDB::BEGIN@4 at line 27
use Moose::Meta::Role;
# spent 86.3ms making 1 call to Moose::BEGIN@27
283579µs113.2ms
# spent 13.2ms (3.20+9.99) within Moose::BEGIN@28 which was called: # once (3.20ms+9.99ms) by KiokuDB::BEGIN@4 at line 28
use Moose::Meta::Role::Composite;
# spent 13.2ms making 1 call to Moose::BEGIN@28
293908µs19.79ms
# spent 9.79ms (2.60+7.19) within Moose::BEGIN@29 which was called: # once (2.60ms+7.19ms) by KiokuDB::BEGIN@4 at line 29
use Moose::Meta::Role::Application;
# spent 9.79ms making 1 call to Moose::BEGIN@29
303544µs111.3ms
# spent 11.3ms (5.65+5.67) within Moose::BEGIN@30 which was called: # once (5.65ms+5.67ms) by KiokuDB::BEGIN@4 at line 30
use Moose::Meta::Role::Application::RoleSummation;
# spent 11.3ms making 1 call to Moose::BEGIN@30
313488µs112.9ms
# spent 12.9ms (4.29+8.56) within Moose::BEGIN@31 which was called: # once (4.29ms+8.56ms) by KiokuDB::BEGIN@4 at line 31
use Moose::Meta::Role::Application::ToClass;
# spent 12.9ms making 1 call to Moose::BEGIN@31
323507µs16.94ms
# spent 6.94ms (3.49+3.45) within Moose::BEGIN@32 which was called: # once (3.49ms+3.45ms) by KiokuDB::BEGIN@4 at line 32
use Moose::Meta::Role::Application::ToRole;
# spent 6.94ms making 1 call to Moose::BEGIN@32
333484µs17.07ms
# spent 7.07ms (1.47+5.60) within Moose::BEGIN@33 which was called: # once (1.47ms+5.60ms) by KiokuDB::BEGIN@4 at line 33
use Moose::Meta::Role::Application::ToInstance;
# spent 7.07ms making 1 call to Moose::BEGIN@33
34
353151µs216.6ms
# spent 8.31ms (45µs+8.27) within Moose::BEGIN@35 which was called: # once (45µs+8.27ms) by KiokuDB::BEGIN@4 at line 35
use Moose::Util::TypeConstraints;
# spent 8.31ms making 1 call to Moose::BEGIN@35 # spent 8.27ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456]
36388µs124µs
# spent 24µs within Moose::BEGIN@36 which was called: # once (24µs+0s) by KiokuDB::BEGIN@4 at line 36
use Moose::Util ();
# spent 24µs making 1 call to Moose::BEGIN@36
37
3834.93ms18.69ms
# spent 8.69ms (1.51+7.18) within Moose::BEGIN@38 which was called: # once (1.51ms+7.18ms) by KiokuDB::BEGIN@4 at line 38
use Moose::Meta::Attribute::Native;
# spent 8.69ms making 1 call to Moose::BEGIN@38
39
40sub throw_error {
41 # FIXME This
42 shift;
43 goto \&confess
44}
45
46
# spent 11.2ms (89µs+11.1) within Moose::extends which was called 2 times, avg 5.58ms/call: # once (50µs+5.59ms) by KiokuDB::BEGIN@11 at line 24 of KiokuDB/Collapser.pm # once (40µs+5.49ms) by Moose::extends at line 359 of Moose/Exporter.pm
sub extends {
4713µs my $meta = shift;
48
4912µs Moose->throw_error("Must derive at least one class") unless @_;
50
51 # this checks the metaclass to make sure
52 # it is correct, sometimes it can get out
53 # of sync when the classes are being built
54128µs15.49ms $meta->superclasses(@_);
# spent 5.49ms making 1 call to Moose::Meta::Class::superclasses
55}
56
57
# spent 1.88s (805µs+1.88) within Moose::with which was called 26 times, avg 72.2ms/call: # 13 times (280µs+924ms) by Moose::with at line 359 of Moose/Exporter.pm, avg 71.1ms/call # once (41µs+292ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 21 of KiokuDB/TypeMap/Entry/MOP.pm # once (50µs+217ms) by KiokuDB::BEGIN@17 at line 56 of KiokuDB/Stream/Objects.pm # once (45µs+196ms) by KiokuDB::Collapser::BEGIN@12 at line 10 of KiokuDB/Entry.pm # once (37µs+66.7ms) by KiokuDB::BEGIN@11 at line 26 of KiokuDB/Collapser.pm # once (37µs+58.9ms) by KiokuDB::Collapser::BEGIN@16 at line 8 of KiokuDB/Error/UnknownObjects.pm # once (38µs+45.4ms) by main::BEGIN@0 at line 246 of KiokuDB.pm # once (50µs+26.2ms) by KiokuDB::BEGIN@14 at line 14 of KiokuDB/TypeMap.pm # once (37µs+12.9ms) by KiokuDB::Linker::BEGIN@18 at line 8 of KiokuDB/Error/MissingObjects.pm # once (38µs+12.0ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 14 of Data/Stream/Bulk/Cat.pm # once (39µs+8.29ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 29 of Data/Stream/Bulk/Filter.pm # once (37µs+6.30ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 14 of Data/Stream/Bulk/Nil.pm # once (37µs+4.71ms) by KiokuDB::Collapser::BEGIN@14 at line 8 of KiokuDB/Reference.pm # once (37µs+4.19ms) by KiokuDB::BEGIN@15 at line 8 of KiokuDB/TypeMap/Shadow.pm
sub with {
5813289µs13924ms Moose::Util::apply_all_roles(shift, @_);
# spent 950ms making 13 calls to Moose::Util::apply_all_roles, avg 73.1ms/call, recursion: max depth 1, sum of overlapping time 26.3ms
59}
60
61
# spent 4.67s (14.4ms+4.66) within Moose::has which was called 216 times, avg 21.6ms/call: # 108 times (10.0ms+2.32s) by Moose::has at line 359 of Moose/Exporter.pm, avg 21.6ms/call # once (41µs+567ms) by KiokuDB::LiveObjects::BEGIN@13 at line 12 of KiokuDB/LiveObjects/Scope.pm # once (40µs+371ms) by KiokuDB::Collapser::BEGIN@15 at line 61 of KiokuDB/Collapser/Buffer.pm # once (37µs+46.2ms) by KiokuDB::Collapser::BEGIN@12 at line 100 of KiokuDB/Entry.pm # once (43µs+35.3ms) by KiokuDB::BEGIN@14 at line 25 of KiokuDB/TypeMap.pm # once (40µs+33.2ms) by KiokuDB::TypeMap::Entry::Std::BEGIN@6 at line 8 of KiokuDB/TypeMap/Entry/Compiled.pm # once (45µs+31.8ms) by KiokuDB::BEGIN@14 at line 16 of KiokuDB/TypeMap.pm # once (42µs+24.0ms) by KiokuDB::BEGIN@13 at line 49 of KiokuDB/LiveObjects.pm # once (55µs+24.0ms) by KiokuDB::BEGIN@14 at line 31 of KiokuDB/TypeMap.pm # once (52µs+23.7ms) by KiokuDB::BEGIN@14 at line 37 of KiokuDB/TypeMap.pm # once (49µs+22.5ms) by KiokuDB::Collapser::BEGIN@12 at line 12 of KiokuDB/Entry.pm # once (38µs+22.4ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 44 of KiokuDB/TypeMap/Entry/MOP.pm # once (38µs+22.3ms) by KiokuDB::Collapser::BEGIN@12 at line 172 of KiokuDB/Entry.pm # once (39µs+22.3ms) by main::BEGIN@0 at line 152 of KiokuDB.pm # once (39µs+22.1ms) by KiokuDB::Collapser::BEGIN@12 at line 129 of KiokuDB/Entry.pm # once (37µs+19.8ms) by KiokuDB::Collapser::BEGIN@12 at line 20 of KiokuDB/Entry.pm # once (40µs+19.3ms) by main::BEGIN@0 at line 172 of KiokuDB.pm # once (39µs+18.3ms) by main::BEGIN@0 at line 77 of KiokuDB.pm # once (45µs+18.2ms) by KiokuDB::Collapser::BEGIN@12 at line 62 of KiokuDB/Entry.pm # once (41µs+17.7ms) by KiokuDB::BEGIN@13 at line 155 of KiokuDB/LiveObjects.pm # once (43µs+17.6ms) by KiokuDB::BEGIN@17 at line 21 of KiokuDB/Stream/Objects.pm # once (39µs+17.1ms) by main::BEGIN@0 at line 221 of KiokuDB.pm # once (38µs+17.0ms) by KiokuDB::BEGIN@11 at line 55 of KiokuDB/Collapser.pm # once (44µs+16.9ms) by main::BEGIN@0 at line 192 of KiokuDB.pm # once (50µs+16.8ms) by KiokuDB::BEGIN@12 at line 22 of KiokuDB/Linker.pm # once (38µs+16.8ms) by main::BEGIN@0 at line 154 of KiokuDB.pm # once (39µs+16.7ms) by KiokuDB::BEGIN@13 at line 240 of KiokuDB/LiveObjects.pm # once (37µs+16.7ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 24 of KiokuDB/Thunk.pm # once (39µs+16.7ms) by KiokuDB::BEGIN@17 at line 33 of KiokuDB/Stream/Objects.pm # once (39µs+16.5ms) by KiokuDB::BEGIN@11 at line 28 of KiokuDB/Collapser.pm # once (37µs+16.3ms) by KiokuDB::Collapser::BEGIN@12 at line 83 of KiokuDB/Entry.pm # once (38µs+16.2ms) by KiokuDB::BEGIN@11 at line 59 of KiokuDB/Collapser.pm # once (40µs+16.2ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 38 of KiokuDB/TypeMap/Entry/MOP.pm # once (40µs+16.1ms) by KiokuDB::LiveObjects::BEGIN@1 at line 59 of Devel/PartialDump.pm # once (38µs+16.1ms) by KiokuDB::Collapser::BEGIN@12 at line 48 of KiokuDB/Entry.pm # once (42µs+16.0ms) by KiokuDB::LiveObjects::BEGIN@1 at line 52 of Devel/PartialDump.pm # once (38µs+16.0ms) by KiokuDB::Collapser::BEGIN@12 at line 55 of KiokuDB/Entry.pm # once (37µs+15.8ms) by KiokuDB::Collapser::BEGIN@12 at line 77 of KiokuDB/Entry.pm # once (38µs+15.6ms) by main::BEGIN@0 at line 72 of KiokuDB.pm # once (38µs+15.3ms) by KiokuDB::Collapser::BEGIN@12 at line 71 of KiokuDB/Entry.pm # once (37µs+15.0ms) by KiokuDB::Collapser::BEGIN@12 at line 42 of KiokuDB/Entry.pm # once (41µs+14.8ms) by KiokuDB::BEGIN@13 at line 32 of KiokuDB/LiveObjects.pm # once (42µs+13.4ms) by KiokuDB::Collapser::BEGIN@16 at line 10 of KiokuDB/Error/UnknownObjects.pm # once (41µs+12.5ms) by KiokuDB::Linker::BEGIN@18 at line 10 of KiokuDB/Error/MissingObjects.pm # once (41µs+12.4ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 16 of Data/Stream/Bulk/Cat.pm # once (39µs+12.3ms) by KiokuDB::Collapser::BEGIN@13 at line 20 of KiokuDB/Entry/Skip.pm # once (42µs+12.2ms) by KiokuDB::BEGIN@15 at line 10 of KiokuDB/TypeMap/Shadow.pm # once (39µs+12.2ms) by KiokuDB::BEGIN@17 at line 45 of KiokuDB/Stream/Objects.pm # once (37µs+12.1ms) by KiokuDB::Collapser::BEGIN@13 at line 14 of KiokuDB/Entry/Skip.pm # once (37µs+12.1ms) by KiokuDB::Collapser::BEGIN@12 at line 36 of KiokuDB/Entry.pm # once (51µs+11.8ms) by KiokuDB::Collapser::BEGIN@18 at line 27 of Data/Visitor.pm # once (40µs+11.7ms) by KiokuDB::BEGIN@11 at line 42 of KiokuDB/Collapser.pm # once (38µs+11.7ms) by KiokuDB::LiveObjects::BEGIN@13 at line 25 of KiokuDB/LiveObjects/Scope.pm # once (39µs+11.2ms) by KiokuDB::BEGIN@17 at line 14 of KiokuDB/Stream/Objects.pm # once (38µs+11.1ms) by KiokuDB::BEGIN@12 at line 35 of KiokuDB/Linker.pm # once (45µs+10.9ms) by KiokuDB::Collapser::BEGIN@18 at line 21 of Data/Visitor.pm # once (40µs+10.5ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 22 of Data/Stream/Bulk/Filter.pm # once (49µs+10.2ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 28 of KiokuDB/TypeMap/Entry/MOP.pm # once (41µs+10.1ms) by KiokuDB::Collapser::BEGIN@15 at line 9 of KiokuDB/Collapser/Buffer.pm # once (39µs+10.0ms) by KiokuDB::Collapser::BEGIN@13 at line 8 of KiokuDB/Entry/Skip.pm # once (40µs+10.0ms) by KiokuDB::BEGIN@12 at line 52 of KiokuDB/Linker.pm # once (45µs+10.00ms) by KiokuDB::BEGIN@17 at line 51 of KiokuDB/Stream/Objects.pm # once (39µs+9.31ms) by main::BEGIN@0 at line 67 of KiokuDB.pm # once (39µs+9.26ms) by KiokuDB::LiveObjects::BEGIN@1 at line 86 of Devel/PartialDump.pm # once (39µs+9.17ms) by main::BEGIN@0 at line 215 of KiokuDB.pm # once (39µs+9.02ms) by KiokuDB::BEGIN@13 at line 167 of KiokuDB/LiveObjects.pm # once (38µs+8.92ms) by KiokuDB::BEGIN@11 at line 49 of KiokuDB/Collapser.pm # once (42µs+8.89ms) by KiokuDB::BEGIN@13 at line 22 of KiokuDB/LiveObjects.pm # once (39µs+8.89ms) by KiokuDB::LiveObjects::BEGIN@1 at line 98 of Devel/PartialDump.pm # once (39µs+8.83ms) by KiokuDB::LiveObjects::BEGIN@1 at line 67 of Devel/PartialDump.pm # once (39µs+8.82ms) by KiokuDB::LiveObjects::BEGIN@1 at line 92 of Devel/PartialDump.pm # once (40µs+8.75ms) by KiokuDB::Collapser::BEGIN@14 at line 10 of KiokuDB/Reference.pm # once (38µs+8.75ms) by KiokuDB::LiveObjects::BEGIN@1 at line 80 of Devel/PartialDump.pm # once (39µs+8.74ms) by KiokuDB::Collapser::BEGIN@15 at line 101 of KiokuDB/Collapser/Buffer.pm # once (53µs+8.69ms) by KiokuDB::LiveObjects::BEGIN@1 at line 74 of Devel/PartialDump.pm # once (41µs+8.54ms) by KiokuDB::BEGIN@11 at line 30 of KiokuDB/Collapser.pm # once (43µs+8.52ms) by main::BEGIN@0 at line 62 of KiokuDB.pm # once (40µs+8.51ms) by KiokuDB::BEGIN@13 at line 27 of KiokuDB/LiveObjects.pm # once (37µs+8.49ms) by KiokuDB::Collapser::BEGIN@14 at line 16 of KiokuDB/Reference.pm # once (38µs+8.34ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 19 of KiokuDB/Thunk.pm # once (38µs+8.30ms) by main::BEGIN@0 at line 208 of KiokuDB.pm # once (43µs+8.29ms) by KiokuDB::BEGIN@13 at line 57 of KiokuDB/LiveObjects.pm # once (39µs+8.26ms) by KiokuDB::TypeMap::Resolver::BEGIN@9 at line 46 of KiokuDB/TypeMap/Entry/MOP.pm # once (38µs+8.11ms) by KiokuDB::Collapser::BEGIN@15 at line 107 of KiokuDB/Collapser/Buffer.pm # once (41µs+8.07ms) by KiokuDB::BEGIN@13 at line 38 of KiokuDB/LiveObjects.pm # once (40µs+8.07ms) by KiokuDB::BEGIN@12 at line 58 of KiokuDB/Linker.pm # once (42µs+8.06ms) by KiokuDB::Collapser::BEGIN@15 at line 93 of KiokuDB/Collapser/Buffer.pm # once (38µs+8.04ms) by KiokuDB::Collapser::BEGIN@15 at line 19 of KiokuDB/Collapser/Buffer.pm # once (39µs+8.03ms) by KiokuDB::BEGIN@11 at line 36 of KiokuDB/Collapser.pm # once (39µs+8.01ms) by KiokuDB::BEGIN@12 at line 29 of KiokuDB/Linker.pm # once (38µs+8.00ms) by KiokuDB::Collapser::BEGIN@15 at line 76 of KiokuDB/Collapser/Buffer.pm # once (39µs+7.99ms) by KiokuDB::TypeMap::Entry::Std::BEGIN@6 at line 14 of KiokuDB/TypeMap/Entry/Compiled.pm # once (39µs+7.98ms) by KiokuDB::TypeMap::Entry::Std::BEGIN@6 at line 20 of KiokuDB/TypeMap/Entry/Compiled.pm # once (41µs+7.96ms) by KiokuDB::BEGIN@17 at line 8 of KiokuDB/Stream/Objects.pm # once (38µs+7.95ms) by main::BEGIN@0 at line 142 of KiokuDB.pm # once (39µs+7.94ms) by KiokuDB::BEGIN@16 at line 28 of KiokuDB/TypeMap/Resolver.pm # once (40µs+7.94ms) by KiokuDB::BEGIN@16 at line 22 of KiokuDB/TypeMap/Resolver.pm # once (38µs+7.94ms) by KiokuDB::BEGIN@12 at line 42 of KiokuDB/Linker.pm # once (40µs+7.93ms) by Class::MOP::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP.pm:118] at line 16 of Data/Stream/Bulk/Filter.pm # once (40µs+7.90ms) by KiokuDB::BEGIN@16 at line 13 of KiokuDB/TypeMap/Resolver.pm # once (39µs+7.89ms) by KiokuDB::LiveObjects::BEGIN@13 at line 20 of KiokuDB/LiveObjects/Scope.pm # once (38µs+7.89ms) by KiokuDB::Collapser::BEGIN@15 at line 44 of KiokuDB/Collapser/Buffer.pm # once (42µs+7.87ms) by KiokuDB::LiveObjects::BEGIN@14 at line 14 of KiokuDB/LiveObjects/TXNScope.pm # once (38µs+7.85ms) by KiokuDB::LiveObjects::BEGIN@14 at line 16 of KiokuDB/LiveObjects/TXNScope.pm # once (39µs+7.84ms) by KiokuDB::LiveObjects::BEGIN@14 at line 22 of KiokuDB/LiveObjects/TXNScope.pm # once (41µs+7.77ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 8 of KiokuDB/Thunk.pm # once (45µs+7.75ms) by KiokuDB::TypeMap::BEGIN@10 at line 8 of KiokuDB/TypeMap/Entry/Alias.pm # once (38µs+7.73ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 14 of KiokuDB/Thunk.pm # once (39µs+7.70ms) by KiokuDB::Collapser::BEGIN@15 at line 38 of KiokuDB/Collapser/Buffer.pm
sub has {
62108382µs my $meta = shift;
63108391µs my $name = shift;
64
65108538µs Moose->throw_error('Usage: has \'name\' => ( key => value, ... )')
66 if @_ % 2 == 1;
67
681082.42ms1084.32ms my %options = ( definition_context => Moose::Util::_caller_info(), @_ );
# spent 4.32ms making 108 calls to Moose::Util::_caller_info, avg 40µs/call
69108712µs my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ];
702165.37ms1162.32s $meta->add_attribute( $_, %options ) for @$attrs;
# spent 2.32s making 116 calls to Moose::Meta::Class::add_attribute, avg 20.0ms/call
71}
72
73
# spent 3.22ms (76µs+3.14) within Moose::before which was called 2 times, avg 1.61ms/call: # once (50µs+1.61ms) by KiokuDB::BEGIN@17 at line 77 of KiokuDB/Stream/Objects.pm # once (26µs+1.53ms) by Moose::before at line 359 of Moose/Exporter.pm
sub before {
74127µs11.53ms Moose::Util::add_method_modifier(shift, 'before', \@_);
# spent 1.53ms making 1 call to Moose::Util::add_method_modifier
75}
76
77sub after {
78 Moose::Util::add_method_modifier(shift, 'after', \@_);
79}
80
81sub around {
82 Moose::Util::add_method_modifier(shift, 'around', \@_);
83}
84
8512µsour $SUPER_PACKAGE;
8612µsour $SUPER_BODY;
8713µsour @SUPER_ARGS;
88
89sub super {
90 # This check avoids a recursion loop - see
91 # t/100_bugs/020_super_recursion.t
92 return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller();
93 return unless $SUPER_BODY; $SUPER_BODY->(@SUPER_ARGS);
94}
95
96sub override {
97 my $meta = shift;
98 my ( $name, $method ) = @_;
99 $meta->add_override_method_modifier( $name => $method );
100}
101
102sub inner {
103 my $pkg = caller();
104 our ( %INNER_BODY, %INNER_ARGS );
105
106 if ( my $body = $INNER_BODY{$pkg} ) {
107 my @args = @{ $INNER_ARGS{$pkg} };
108 local $INNER_ARGS{$pkg};
109 local $INNER_BODY{$pkg};
110 return $body->(@args);
111 } else {
112 return;
113 }
114}
115
116sub augment {
117 my $meta = shift;
118 my ( $name, $method ) = @_;
119 $meta->add_augment_method_modifier( $name => $method );
120}
121
122137µs14.27msMoose::Exporter->setup_import_methods(
# spent 4.27ms making 1 call to Moose::Exporter::setup_import_methods
123 with_meta => [
124 qw( extends with has before after around override augment )
125 ],
126 as_is => [
127 qw( super inner ),
128 \&Carp::confess,
129 \&Scalar::Util::blessed,
130 ],
131);
132
133
# spent 339ms (5.86+333) within Moose::init_meta which was called 25 times, avg 13.5ms/call: # 25 times (5.86ms+333ms) by Moose::Exporter::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Exporter.pm:456] at line 423 of Moose/Exporter.pm, avg 13.5ms/call
sub init_meta {
134 # This used to be called as a function. This hack preserves
135 # backwards compatibility.
1362580µs if ( $_[0] ne __PACKAGE__ ) {
137 Moose::Deprecated::deprecated(
138 feature => 'Moose::init_meta',
139 message => 'Calling Moose::init_meta as a function is deprecated',
140 );
141
142 return __PACKAGE__->init_meta(
143 for_class => $_[0],
144 base_class => $_[1],
145 metaclass => $_[2],
146 );
147 }
148
1492562µs shift;
15025314µs my %args = @_;
151
15225108µs my $class = $args{for_class}
153 or Moose->throw_error("Cannot call init_meta without specifying a for_class");
1542589µs my $base_class = $args{base_class} || 'Moose::Object';
1552563µs my $metaclass = $args{metaclass} || 'Moose::Meta::Class';
1562593µs my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta';
157
15825742µs25279µs Moose->throw_error("The Metaclass $metaclass must be a subclass of Moose::Meta::Class.")
# spent 279µs making 25 calls to UNIVERSAL::isa, avg 11µs/call
159 unless $metaclass->isa('Moose::Meta::Class');
160
161 # make a subtype for each Moose class
16225553µs5023.5ms class_type($class)
# spent 21.1ms making 25 calls to Moose::Util::TypeConstraints::class_type, avg 845µs/call # spent 2.40ms making 25 calls to Moose::Util::TypeConstraints::find_type_constraint, avg 96µs/call
163 unless find_type_constraint($class);
164
1652550µs my $meta;
166
16725428µs25309µs if ( $meta = Class::MOP::get_metaclass_by_name($class) ) {
# spent 309µs making 25 calls to Class::MOP::get_metaclass_by_name, avg 12µs/call
168 unless ( $meta->isa("Moose::Meta::Class") ) {
169 my $error_message = "$class already has a metaclass, but it does not inherit $metaclass ($meta).";
170 if ( $meta->isa('Moose::Meta::Role') ) {
171 Moose->throw_error($error_message . ' You cannot make the same thing a role and a class. Remove either Moose or Moose::Role.');
172 } else {
173 Moose->throw_error($error_message);
174 }
175 }
176 } else {
177 # no metaclass
178
179 # now we check whether our ancestors have metaclass, and if so borrow that
18025827µs25452µs my ( undef, @isa ) = @{ mro::get_linear_isa($class) };
# spent 452µs making 25 calls to mro::get_linear_isa, avg 18µs/call
181
18225167µs foreach my $ancestor ( @isa ) {
183 my $ancestor_meta = Class::MOP::get_metaclass_by_name($ancestor) || next;
184
185 my $ancestor_meta_class = $ancestor_meta->_real_ref_name;
186
187 # if we have an ancestor metaclass that inherits $metaclass, we use
188 # that. This is like _fix_metaclass_incompatibility, but we can do it now.
189
190 # the case of having an ancestry is not very common, but arises in
191 # e.g. Reaction
192 unless ( $metaclass->isa( $ancestor_meta_class ) ) {
193 if ( $ancestor_meta_class->isa($metaclass) ) {
194 $metaclass = $ancestor_meta_class;
195 }
196 }
197 }
198
19925397µs25100ms $meta = $metaclass->initialize($class);
# spent 100ms making 25 calls to Moose::Meta::Class::initialize, avg 4.00ms/call
200 }
201
20225278µs if (defined $meta_name) {
203 # also check for inherited non moose 'meta' method?
20425357µs254.15ms my $existing = $meta->get_method($meta_name);
# spent 4.15ms making 25 calls to Class::MOP::Mixin::HasMethods::get_method, avg 166µs/call
2052554µs if ($existing && !$existing->isa('Class::MOP::Method::Meta')) {
206 Carp::cluck "Moose is overwriting an existing method named "
207 . "$meta_name in class $class with a method "
208 . "which returns the class's metaclass. If this is "
209 . "actually what you want, you should remove the "
210 . "existing method, otherwise, you should rename or "
211 . "disable this generated method using the "
212 . "'-meta_name' option to 'use Moose'.";
213 }
21425339µs2565.4ms $meta->_add_meta_method($meta_name);
# spent 65.4ms making 25 calls to Class::MOP::Mixin::HasMethods::_add_meta_method, avg 2.62ms/call
215 }
216
217 # make sure they inherit from Moose::Object
21825605µs50139ms $meta->superclasses($base_class)
# spent 139ms making 50 calls to Moose::Meta::Class::superclasses, avg 2.77ms/call
219 unless $meta->superclasses();
220
22125467µs return $meta;
222}
223
224# This may be used in some older MooseX extensions.
225sub _get_caller {
226 goto &Moose::Exporter::_get_caller;
227}
228
229## make 'em all immutable
230
23122200µs22141µs$_->make_immutable(
# spent 141µs making 22 calls to Class::MOP::Class::is_mutable, avg 6µs/call
232 inline_constructor => 1,
233 constructor_name => "_new",
234 # these are Class::MOP accessors, so they need inlining
235 inline_accessors => 1
23623893µs44418ms ) for grep { $_->is_mutable }
# spent 405ms making 22 calls to Class::MOP::Class::make_immutable, avg 18.4ms/call # spent 12.0ms making 10 calls to Class::MOP::Object::meta, avg 1.20ms/call # spent 144µs making 2 calls to Moose::Meta::Role::Method::Required::meta, avg 72µs/call # spent 90µs making 1 call to Moose::Meta::Role::Composite::meta # spent 79µs making 1 call to Moose::Meta::Role::meta # spent 79µs making 1 call to Moose::Meta::Role::Application::ToRole::meta # spent 78µs making 1 call to Moose::Meta::TypeCoercion::Union::meta # spent 70µs making 1 call to Moose::Meta::TypeCoercion::meta # spent 70µs making 1 call to Class::MOP::Mixin::meta # spent 70µs making 1 call to Moose::Meta::Role::Application::meta # spent 69µs making 1 call to Moose::Meta::Role::Application::ToClass::meta # spent 69µs making 1 call to Moose::Meta::Role::Application::RoleSummation::meta # spent 69µs making 1 call to Moose::Meta::Role::Application::ToInstance::meta
237 map { $_->meta }
238 qw(
239 Moose::Meta::Attribute
240 Moose::Meta::Class
241 Moose::Meta::Instance
242
243 Moose::Meta::TypeCoercion
244 Moose::Meta::TypeCoercion::Union
245
246 Moose::Meta::Method
247 Moose::Meta::Method::Accessor
248 Moose::Meta::Method::Constructor
249 Moose::Meta::Method::Destructor
250 Moose::Meta::Method::Overridden
251 Moose::Meta::Method::Augmented
252
253 Moose::Meta::Role
254 Moose::Meta::Role::Attribute
255 Moose::Meta::Role::Method
256 Moose::Meta::Role::Method::Required
257 Moose::Meta::Role::Method::Conflicting
258
259 Moose::Meta::Role::Composite
260
261 Moose::Meta::Role::Application
262 Moose::Meta::Role::Application::RoleSummation
263 Moose::Meta::Role::Application::ToClass
264 Moose::Meta::Role::Application::ToRole
265 Moose::Meta::Role::Application::ToInstance
26612µs);
267
268124µs246.8msMoose::Meta::Mixin::AttributeCore->meta->make_immutable(
# spent 46.7ms making 1 call to Class::MOP::Class::make_immutable # spent 78µs making 1 call to Class::MOP::Mixin::meta
269 inline_constructor => 0,
270 constructor_name => undef,
271);
272
273156µs1;
274
275__END__