| Filename | /home/doy/coding/src/Moose/blib/lib//Moose.pm |
| Statements | Executed 1440 statements in 30.8ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 13.2ms | 88.9ms | Moose::BEGIN@27 |
| 1 | 1 | 1 | 12.9ms | 91.7ms | Moose::BEGIN@19 |
| 1 | 1 | 1 | 11.7ms | 19.7ms | Moose::BEGIN@15 |
| 45 | 1 | 1 | 10.4ms | 618ms | Moose::init_meta |
| 100 | 51 | 27 | 6.81ms | 5.17s | Moose::has |
| 1 | 1 | 1 | 6.66ms | 41.0ms | Moose::BEGIN@20 |
| 1 | 1 | 1 | 5.69ms | 11.3ms | Moose::BEGIN@30 |
| 1 | 1 | 1 | 4.18ms | 12.7ms | Moose::BEGIN@31 |
| 106 | 54 | 40 | 3.83ms | 4.60s | Moose::with (recurses: max depth 1, inclusive time 74.7ms) |
| 1 | 1 | 1 | 3.53ms | 7.02ms | Moose::BEGIN@32 |
| 1 | 1 | 1 | 3.38ms | 19.4ms | Moose::BEGIN@25 |
| 1 | 1 | 1 | 3.37ms | 10.6ms | Moose::BEGIN@29 |
| 1 | 1 | 1 | 3.17ms | 13.2ms | Moose::BEGIN@28 |
| 1 | 1 | 1 | 2.92ms | 426ms | Moose::BEGIN@21 |
| 1 | 1 | 1 | 1.48ms | 8.75ms | Moose::BEGIN@38 |
| 1 | 1 | 1 | 1.47ms | 7.08ms | Moose::BEGIN@33 |
| 1 | 1 | 1 | 1.04ms | 2.11ms | Moose::BEGIN@14 |
| 1 | 1 | 1 | 954µs | 8.44ms | Moose::BEGIN@23 |
| 6 | 4 | 4 | 224µs | 30.6ms | Moose::extends |
| 1 | 1 | 1 | 88µs | 88µs | Moose::BEGIN@5 |
| 2 | 2 | 2 | 73µs | 3.30ms | Moose::around |
| 1 | 1 | 1 | 64µs | 82µs | Moose::BEGIN@2 |
| 1 | 1 | 1 | 52µs | 109µs | Moose::BEGIN@17 |
| 1 | 1 | 1 | 44µs | 8.41ms | Moose::BEGIN@35 |
| 1 | 1 | 1 | 40µs | 199µs | Moose::BEGIN@11 |
| 1 | 1 | 1 | 39µs | 108µs | Moose::BEGIN@3 |
| 1 | 1 | 1 | 36µs | 163µs | Moose::BEGIN@12 |
| 1 | 1 | 1 | 28µs | 28µs | Moose::BEGIN@22 |
| 1 | 1 | 1 | 24µs | 24µs | Moose::BEGIN@36 |
| 0 | 0 | 0 | 0s | 0s | Moose::_get_caller |
| 0 | 0 | 0 | 0s | 0s | Moose::after |
| 0 | 0 | 0 | 0s | 0s | Moose::augment |
| 0 | 0 | 0 | 0s | 0s | Moose::before |
| 0 | 0 | 0 | 0s | 0s | Moose::inner |
| 0 | 0 | 0 | 0s | 0s | Moose::override |
| 0 | 0 | 0 | 0s | 0s | Moose::super |
| 0 | 0 | 0 | 0s | 0s | Moose::throw_error |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Moose; | ||||
| 2 | 3 | 99µs | 2 | 101µs | # spent 82µs (64+19) within Moose::BEGIN@2 which was called:
# once (64µs+19µs) by MooseX::Types::BEGIN@2 at line 2 # spent 82µs making 1 call to Moose::BEGIN@2
# spent 19µs making 1 call to strict::import |
| 3 | 3 | 90µs | 2 | 177µs | # spent 108µs (39+69) within Moose::BEGIN@3 which was called:
# once (39µs+69µs) by MooseX::Types::BEGIN@2 at line 3 # spent 108µs making 1 call to Moose::BEGIN@3
# spent 69µs making 1 call to warnings::import |
| 4 | |||||
| 5 | 3 | 259µs | 1 | 88µs | # spent 88µs within Moose::BEGIN@5 which was called:
# once (88µs+0s) by MooseX::Types::BEGIN@2 at line 5 # spent 88µs making 1 call to Moose::BEGIN@5 |
| 6 | |||||
| 7 | 1 | 5µs | our $VERSION = '1.19'; | ||
| 8 | 1 | 67µs | $VERSION = eval $VERSION; # spent 12µs executing statements in string eval | ||
| 9 | 1 | 3µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 10 | |||||
| 11 | 3 | 105µs | 2 | 357µs | # spent 199µs (40+159) within Moose::BEGIN@11 which was called:
# once (40µs+159µs) by MooseX::Types::BEGIN@2 at line 11 # spent 199µs making 1 call to Moose::BEGIN@11
# spent 158µs making 1 call to Exporter::import |
| 12 | 3 | 114µs | 2 | 289µs | # spent 163µs (36+126) within Moose::BEGIN@12 which was called:
# once (36µs+126µs) by MooseX::Types::BEGIN@2 at line 12 # spent 163µs making 1 call to Moose::BEGIN@12
# spent 126µs making 1 call to Exporter::import |
| 13 | |||||
| 14 | 3 | 475µs | 2 | 2.14ms | # spent 2.11ms (1.04+1.07) within Moose::BEGIN@14 which was called:
# once (1.04ms+1.07ms) by MooseX::Types::BEGIN@2 at line 14 # spent 2.11ms making 1 call to Moose::BEGIN@14
# spent 34µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:61] |
| 15 | 3 | 450µs | 2 | 19.8ms | # spent 19.7ms (11.7+7.95) within Moose::BEGIN@15 which was called:
# once (11.7ms+7.95ms) by MooseX::Types::BEGIN@2 at line 15 # spent 19.7ms making 1 call to Moose::BEGIN@15
# spent 154µs making 1 call to Moose::Exporter::import |
| 16 | |||||
| 17 | 3 | 174µs | 2 | 165µs | # spent 109µs (52+56) within Moose::BEGIN@17 which was called:
# once (52µs+56µs) by MooseX::Types::BEGIN@2 at line 17 # spent 109µs making 1 call to Moose::BEGIN@17
# spent 56µs making 1 call to UNIVERSAL::VERSION |
| 18 | |||||
| 19 | 3 | 509µs | 1 | 91.7ms | # spent 91.7ms (12.9+78.8) within Moose::BEGIN@19 which was called:
# once (12.9ms+78.8ms) by MooseX::Types::BEGIN@2 at line 19 # spent 91.7ms making 1 call to Moose::BEGIN@19 |
| 20 | 3 | 585µs | 1 | 41.0ms | # spent 41.0ms (6.66+34.4) within Moose::BEGIN@20 which was called:
# once (6.66ms+34.4ms) by MooseX::Types::BEGIN@2 at line 20 # spent 41.0ms making 1 call to Moose::BEGIN@20 |
| 21 | 3 | 674µs | 1 | 426ms | # spent 426ms (2.92+423) within Moose::BEGIN@21 which was called:
# once (2.92ms+423ms) by MooseX::Types::BEGIN@2 at line 21 # spent 426ms making 1 call to Moose::BEGIN@21 |
| 22 | 3 | 114µs | 1 | 28µs | # spent 28µs within Moose::BEGIN@22 which was called:
# once (28µs+0s) by MooseX::Types::BEGIN@2 at line 22 # spent 28µs making 1 call to Moose::BEGIN@22 |
| 23 | 3 | 509µs | 1 | 8.44ms | # spent 8.44ms (954µs+7.49) within Moose::BEGIN@23 which was called:
# once (954µs+7.49ms) by MooseX::Types::BEGIN@2 at line 23 # spent 8.44ms making 1 call to Moose::BEGIN@23 |
| 24 | |||||
| 25 | 3 | 476µs | 1 | 19.4ms | # spent 19.4ms (3.38+16.0) within Moose::BEGIN@25 which was called:
# once (3.38ms+16.0ms) by MooseX::Types::BEGIN@2 at line 25 # spent 19.4ms making 1 call to Moose::BEGIN@25 |
| 26 | |||||
| 27 | 3 | 504µs | 1 | 88.9ms | # spent 88.9ms (13.2+75.7) within Moose::BEGIN@27 which was called:
# once (13.2ms+75.7ms) by MooseX::Types::BEGIN@2 at line 27 # spent 88.9ms making 1 call to Moose::BEGIN@27 |
| 28 | 3 | 600µs | 1 | 13.2ms | # spent 13.2ms (3.17+10.0) within Moose::BEGIN@28 which was called:
# once (3.17ms+10.0ms) by MooseX::Types::BEGIN@2 at line 28 # spent 13.2ms making 1 call to Moose::BEGIN@28 |
| 29 | 3 | 511µs | 1 | 10.6ms | # spent 10.6ms (3.37+7.19) within Moose::BEGIN@29 which was called:
# once (3.37ms+7.19ms) by MooseX::Types::BEGIN@2 at line 29 # spent 10.6ms making 1 call to Moose::BEGIN@29 |
| 30 | 3 | 523µs | 1 | 11.3ms | # spent 11.3ms (5.69+5.65) within Moose::BEGIN@30 which was called:
# once (5.69ms+5.65ms) by MooseX::Types::BEGIN@2 at line 30 # spent 11.3ms making 1 call to Moose::BEGIN@30 |
| 31 | 3 | 486µs | 1 | 12.7ms | # spent 12.7ms (4.18+8.54) within Moose::BEGIN@31 which was called:
# once (4.18ms+8.54ms) by MooseX::Types::BEGIN@2 at line 31 # spent 12.7ms making 1 call to Moose::BEGIN@31 |
| 32 | 3 | 556µs | 1 | 7.02ms | # spent 7.02ms (3.53+3.50) within Moose::BEGIN@32 which was called:
# once (3.53ms+3.50ms) by MooseX::Types::BEGIN@2 at line 32 # spent 7.02ms making 1 call to Moose::BEGIN@32 |
| 33 | 3 | 471µs | 1 | 7.08ms | # spent 7.08ms (1.47+5.61) within Moose::BEGIN@33 which was called:
# once (1.47ms+5.61ms) by MooseX::Types::BEGIN@2 at line 33 # spent 7.08ms making 1 call to Moose::BEGIN@33 |
| 34 | |||||
| 35 | 3 | 152µs | 2 | 16.8ms | # spent 8.41ms (44µs+8.36) within Moose::BEGIN@35 which was called:
# once (44µs+8.36ms) by MooseX::Types::BEGIN@2 at line 35 # spent 8.41ms making 1 call to Moose::BEGIN@35
# spent 8.36ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 36 | 3 | 90µs | 1 | 24µs | # spent 24µs within Moose::BEGIN@36 which was called:
# once (24µs+0s) by MooseX::Types::BEGIN@2 at line 36 # spent 24µs making 1 call to Moose::BEGIN@36 |
| 37 | |||||
| 38 | 3 | 4.21ms | 1 | 8.75ms | # spent 8.75ms (1.48+7.27) within Moose::BEGIN@38 which was called:
# once (1.48ms+7.27ms) by MooseX::Types::BEGIN@2 at line 38 # spent 8.75ms making 1 call to Moose::BEGIN@38 |
| 39 | |||||
| 40 | sub throw_error { | ||||
| 41 | # FIXME This | ||||
| 42 | shift; | ||||
| 43 | goto \&confess | ||||
| 44 | } | ||||
| 45 | |||||
| 46 | # spent 30.6ms (224µs+30.4) within Moose::extends which was called 6 times, avg 5.11ms/call:
# 3 times (101µs+15.1ms) by Moose::extends at line 359 of Moose/Exporter.pm, avg 5.05ms/call
# once (38µs+5.57ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@8 at line 3 of MooseX/Role/Parameterized/Meta/Parameter.pm
# once (40µs+4.89ms) by MooseX::Role::Parameterized::BEGIN@8 at line 3 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (45µs+4.88ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@7 at line 3 of MooseX/Role/Parameterized/Meta/Role/Parameterized.pm | ||||
| 47 | 9 | 89µs | my $meta = shift; | ||
| 48 | |||||
| 49 | 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 | ||||
| 54 | 3 | 15.1ms | $meta->superclasses(@_); # spent 15.1ms making 3 calls to Moose::Meta::Class::superclasses, avg 5.02ms/call | ||
| 55 | } | ||||
| 56 | |||||
| 57 | # spent 4.60s (3.83ms+4.60) within Moose::with which was called 106 times, avg 43.4ms/call:
# 53 times (1.10ms+2.26s) by Moose::with at line 359 of Moose/Exporter.pm, avg 42.7ms/call
# once (39µs+449ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@10 at line 13 of Markdent/Event/StartDocument.pm
# once (62µs+274ms) by Markdent::Simple::Document::BEGIN@9 at line 15 of Markdent/Handler/HTMLStream/Document.pm
# once (43µs+151ms) by Markdent::Parser::BEGIN@10 at line 36 of Markdent/Dialect/Standard/BlockParser.pm
# once (40µs+103ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 23 of Markdent/Event/EndCode.pm
# once (40µs+74.7ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@7 at line 4 of MooseX/Role/Parameterized/Meta/Role/Parameterized.pm
# once (46µs+60.1ms) by Markdent::Parser::BEGIN@11 at line 36 of Markdent/Dialect/Standard/SpanParser.pm
# once (42µs+34.2ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@20 at line 13 of Markdent/Event/StartParagraph.pm
# once (45µs+33.2ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 45 of Markdent/Event/Image.pm
# once (40µs+32.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@24 at line 27 of Markdent/Event/StartHTMLTag.pm
# once (41µs+32.0ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@12 at line 21 of Markdent/Event/AutoLink.pm
# once (40µs+31.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 39 of Markdent/Event/StartLink.pm
# once (50µs+30.9ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@22 at line 13 of Markdent/Event/StartUnorderedList.pm
# once (39µs+30.8ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@21 at line 13 of Markdent/Event/EndParagraph.pm
# once (39µs+30.7ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 21 of Markdent/Event/StartEmphasis.pm
# once (40µs+30.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 21 of Markdent/Event/StartCode.pm
# once (40µs+30.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@20 at line 27 of Markdent/Event/HTMLTag.pm
# once (306µs+30.3ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@16 at line 13 of Markdent/Event/EndLink.pm
# once (40µs+30.5ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@19 at line 21 of Markdent/Event/HTMLEntity.pm
# once (40µs+30.5ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@27 at line 21 of Markdent/Event/Preformatted.pm
# once (40µs+30.5ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@26 at line 21 of Markdent/Event/HTMLCommentBlock.pm
# once (40µs+30.4ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 21 of Markdent/Event/StartStrong.pm
# once (39µs+30.4ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@15 at line 21 of Markdent/Event/EndHeader.pm
# once (41µs+30.4ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@25 at line 21 of Markdent/Event/HTMLBlock.pm
# once (40µs+30.4ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 33 of Markdent/Event/Text.pm
# once (40µs+30.3ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@18 at line 21 of Markdent/Event/HTMLComment.pm
# once (41µs+30.3ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@15 at line 21 of Markdent/Event/EndHTMLTag.pm
# once (40µs+30.3ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 21 of Markdent/Event/EndCode.pm
# once (41µs+30.2ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 21 of Markdent/Event/EndEmphasis.pm
# once (42µs+30.2ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 21 of Markdent/Event/EndStrong.pm
# once (53µs+30.2ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@18 at line 13 of Markdent/Event/StartOrderedList.pm
# once (39µs+30.2ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@11 at line 13 of Markdent/Event/EndDocument.pm
# once (38µs+30.1ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@16 at line 13 of Markdent/Event/StartListItem.pm
# once (39µs+30.0ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@14 at line 21 of Markdent/Event/StartHeader.pm
# once (42µs+30.0ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@23 at line 13 of Markdent/Event/EndUnorderedList.pm
# once (39µs+30.0ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@24 at line 13 of Markdent/Event/HorizontalRule.pm
# once (41µs+30.0ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@19 at line 13 of Markdent/Event/EndOrderedList.pm
# once (39µs+29.8ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@13 at line 13 of Markdent/Event/EndBlockquote.pm
# once (39µs+29.8ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@12 at line 13 of Markdent/Event/StartBlockquote.pm
# once (39µs+29.8ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@17 at line 13 of Markdent/Event/EndListItem.pm
# once (40µs+29.1ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 25 of Markdent/Event/EndCode.pm
# once (315µs+23.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@16 at line 15 of Markdent/Event/EndLink.pm
# once (42µs+23.8ms) by Markdent::Simple::Document::BEGIN@10 at line 21 of Markdent/Parser.pm
# once (41µs+20.7ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 23 of Markdent/Event/EndStrong.pm
# once (39µs+19.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 23 of Markdent/Event/StartEmphasis.pm
# once (45µs+19.5ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 23 of Markdent/Event/EndEmphasis.pm
# once (40µs+19.4ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 23 of Markdent/Event/StartStrong.pm
# once (38µs+19.4ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 23 of Markdent/Event/StartCode.pm
# once (39µs+18.8ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 41 of Markdent/Event/StartLink.pm
# once (39µs+4.83ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 25 of Markdent/Event/StartEmphasis.pm
# once (39µs+4.38ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 25 of Markdent/Event/StartCode.pm
# once (40µs+4.29ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 25 of Markdent/Event/EndStrong.pm
# once (40µs+4.24ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 25 of Markdent/Event/EndEmphasis.pm
# once (39µs+4.23ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 25 of Markdent/Event/StartStrong.pm | ||||
| 58 | 53 | 1.16ms | 53 | 2.26s | Moose::Util::apply_all_roles(shift, @_); # spent 2.34s making 53 calls to Moose::Util::apply_all_roles, avg 44.1ms/call, recursion: max depth 1, sum of overlapping time 74.7ms |
| 59 | } | ||||
| 60 | |||||
| 61 | # spent 5.17s (6.81ms+5.16) within Moose::has which was called 100 times, avg 51.7ms/call:
# 50 times (4.73ms+2.58s) by Moose::has at line 359 of Moose/Exporter.pm, avg 51.6ms/call
# once (44µs+578ms) by Markdent::Parser::BEGIN@10 at line 43 of Markdent/Dialect/Standard/BlockParser.pm
# once (45µs+522ms) by Markdent::Parser::BEGIN@11 at line 43 of Markdent/Dialect/Standard/SpanParser.pm
# once (41µs+376ms) by Markdent::Parser::BEGIN@11 at line 51 of Markdent/Dialect/Standard/SpanParser.pm
# once (41µs+308ms) by Markdent::Parser::BEGIN@10 at line 50 of Markdent/Dialect/Standard/BlockParser.pm
# once (40µs+308ms) by Markdent::Parser::BEGIN@10 at line 62 of Markdent/Dialect/Standard/BlockParser.pm
# once (42µs+32.8ms) by Markdent::Parser::BEGIN@11 at line 69 of Markdent/Dialect/Standard/SpanParser.pm
# once (44µs+17.6ms) by Markdent::Simple::Document::BEGIN@10 at line 23 of Markdent/Parser.pm
# once (40µs+17.4ms) by Markdent::Simple::Document::BEGIN@10 at line 44 of Markdent/Parser.pm
# once (49µs+17.4ms) by Markdent::Simple::Document::BEGIN@10 at line 51 of Markdent/Parser.pm
# once (40µs+17.2ms) by Markdent::Simple::Document::BEGIN@10 at line 38 of Markdent/Parser.pm
# once (50µs+16.1ms) by Markdent::Simple::Document::BEGIN@9 at line 17 of Markdent/Handler/HTMLStream/Document.pm
# once (43µs+15.0ms) by MooseX::Role::Parameterized::BEGIN@8 at line 32 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (41µs+14.6ms) by Markdent::Simple::Document::BEGIN@10 at line 57 of Markdent/Parser.pm
# once (40µs+14.1ms) by MooseX::Role::Parameterized::BEGIN@8 at line 37 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (46µs+14.0ms) by Markdent::Simple::Document::BEGIN@10 at line 30 of Markdent/Parser.pm
# once (42µs+13.9ms) by Markdent::Parser::BEGIN@11 at line 76 of Markdent/Dialect/Standard/SpanParser.pm
# once (41µs+13.8ms) by Markdent::Parser::BEGIN@11 at line 84 of Markdent/Dialect/Standard/SpanParser.pm
# once (40µs+12.0ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 27 of Markdent/Event/Image.pm
# once (40µs+11.9ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 33 of Markdent/Event/Image.pm
# once (39µs+11.8ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 27 of Markdent/Event/Text.pm
# once (39µs+11.8ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 21 of Markdent/Event/StartLink.pm
# once (38µs+11.8ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 21 of Markdent/Event/Text.pm
# once (38µs+11.7ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 27 of Markdent/Event/StartLink.pm
# once (42µs+10.1ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@24 at line 15 of Markdent/Event/StartHTMLTag.pm
# once (40µs+9.16ms) by MooseX::Role::Parameterized::BEGIN@8 at line 14 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (51µs+9.15ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 15 of Markdent/Event/StartStrong.pm
# once (42µs+8.85ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@15 at line 15 of Markdent/Event/EndHeader.pm
# once (41µs+8.64ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@14 at line 15 of Markdent/Event/StartHeader.pm
# once (41µs+8.52ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@18 at line 15 of Markdent/Event/HTMLComment.pm
# once (42µs+8.50ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 15 of Markdent/Event/StartEmphasis.pm
# once (39µs+8.07ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 39 of Markdent/Event/Image.pm
# once (47µs+7.99ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 15 of Markdent/Event/Image.pm
# once (39µs+7.97ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 33 of Markdent/Event/StartLink.pm
# once (39µs+7.94ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@24 at line 25 of Markdent/Event/StartHTMLTag.pm
# once (41µs+7.92ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 15 of Markdent/Event/Text.pm
# once (41µs+7.92ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@20 at line 15 of Markdent/Event/HTMLTag.pm
# once (38µs+7.91ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@20 at line 25 of Markdent/Event/HTMLTag.pm
# once (41µs+7.90ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 15 of Markdent/Event/EndEmphasis.pm
# once (43µs+7.89ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 15 of Markdent/Event/EndCode.pm
# once (42µs+7.89ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 15 of Markdent/Event/StartCode.pm
# once (41µs+7.89ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@26 at line 15 of Markdent/Event/HTMLCommentBlock.pm
# once (39µs+7.88ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 21 of Markdent/Event/Image.pm
# once (41µs+7.86ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@15 at line 15 of Markdent/Event/EndHTMLTag.pm
# once (44µs+7.85ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@12 at line 15 of Markdent/Event/AutoLink.pm
# once (47µs+7.84ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 15 of Markdent/Event/StartLink.pm
# once (40µs+7.83ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@25 at line 15 of Markdent/Event/HTMLBlock.pm
# once (43µs+7.81ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 15 of Markdent/Event/EndStrong.pm
# once (41µs+7.78ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@19 at line 15 of Markdent/Event/HTMLEntity.pm
# once (41µs+7.78ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@27 at line 15 of Markdent/Event/Preformatted.pm
# once (38µs+5.12ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@8 at line 9 of MooseX/Role/Parameterized/Meta/Parameter.pm | ||||
| 62 | 350 | 4.57ms | my $meta = shift; | ||
| 63 | my $name = shift; | ||||
| 64 | |||||
| 65 | Moose->throw_error('Usage: has \'name\' => ( key => value, ... )') | ||||
| 66 | if @_ % 2 == 1; | ||||
| 67 | |||||
| 68 | 50 | 2.16ms | my %options = ( definition_context => Moose::Util::_caller_info(), @_ ); # spent 2.16ms making 50 calls to Moose::Util::_caller_info, avg 43µs/call | ||
| 69 | my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ]; | ||||
| 70 | 50 | 2.58s | $meta->add_attribute( $_, %options ) for @$attrs; # spent 2.58s making 50 calls to Moose::Meta::Class::add_attribute, avg 51.5ms/call | ||
| 71 | } | ||||
| 72 | |||||
| 73 | sub before { | ||||
| 74 | Moose::Util::add_method_modifier(shift, 'before', \@_); | ||||
| 75 | } | ||||
| 76 | |||||
| 77 | sub after { | ||||
| 78 | Moose::Util::add_method_modifier(shift, 'after', \@_); | ||||
| 79 | } | ||||
| 80 | |||||
| 81 | # spent 3.30ms (73µs+3.23) within Moose::around which was called 2 times, avg 1.65ms/call:
# once (49µs+1.65ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@8 at line 20 of MooseX/Role/Parameterized/Meta/Parameter.pm
# once (24µs+1.57ms) by Moose::around at line 359 of Moose/Exporter.pm | ||||
| 82 | 1 | 27µs | 1 | 1.57ms | Moose::Util::add_method_modifier(shift, 'around', \@_); # spent 1.57ms making 1 call to Moose::Util::add_method_modifier |
| 83 | } | ||||
| 84 | |||||
| 85 | 1 | 2µs | our $SUPER_PACKAGE; | ||
| 86 | 1 | 2µs | our $SUPER_BODY; | ||
| 87 | 1 | 2µs | our @SUPER_ARGS; | ||
| 88 | |||||
| 89 | sub 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 | |||||
| 96 | sub override { | ||||
| 97 | my $meta = shift; | ||||
| 98 | my ( $name, $method ) = @_; | ||||
| 99 | $meta->add_override_method_modifier( $name => $method ); | ||||
| 100 | } | ||||
| 101 | |||||
| 102 | sub 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 | |||||
| 116 | sub augment { | ||||
| 117 | my $meta = shift; | ||||
| 118 | my ( $name, $method ) = @_; | ||||
| 119 | $meta->add_augment_method_modifier( $name => $method ); | ||||
| 120 | } | ||||
| 121 | |||||
| 122 | 1 | 35µs | 1 | 4.35ms | Moose::Exporter->setup_import_methods( # spent 4.35ms 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 618ms (10.4+608) within Moose::init_meta which was called 45 times, avg 13.7ms/call:
# 45 times (10.4ms+608ms) by Moose::Exporter::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Exporter.pm:456] at line 423 of Moose/Exporter.pm, avg 13.7ms/call | ||||
| 134 | # This used to be called as a function. This hack preserves | ||||
| 135 | # backwards compatibility. | ||||
| 136 | 630 | 7.03ms | 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 | |||||
| 149 | shift; | ||||
| 150 | my %args = @_; | ||||
| 151 | |||||
| 152 | my $class = $args{for_class} | ||||
| 153 | or Moose->throw_error("Cannot call init_meta without specifying a for_class"); | ||||
| 154 | my $base_class = $args{base_class} || 'Moose::Object'; | ||||
| 155 | my $metaclass = $args{metaclass} || 'Moose::Meta::Class'; | ||||
| 156 | my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta'; | ||||
| 157 | |||||
| 158 | 45 | 552µs | Moose->throw_error("The Metaclass $metaclass must be a subclass of Moose::Meta::Class.") # spent 552µs making 45 calls to UNIVERSAL::isa, avg 12µs/call | ||
| 159 | unless $metaclass->isa('Moose::Meta::Class'); | ||||
| 160 | |||||
| 161 | # make a subtype for each Moose class | ||||
| 162 | 90 | 42.9ms | class_type($class) # spent 38.4ms making 45 calls to Moose::Util::TypeConstraints::class_type, avg 853µs/call
# spent 4.52ms making 45 calls to Moose::Util::TypeConstraints::find_type_constraint, avg 101µs/call | ||
| 163 | unless find_type_constraint($class); | ||||
| 164 | |||||
| 165 | my $meta; | ||||
| 166 | |||||
| 167 | 135 | 2.55ms | 45 | 541µs | if ( $meta = Class::MOP::get_metaclass_by_name($class) ) { # spent 541µs making 45 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 | ||||
| 180 | 45 | 854µs | my ( undef, @isa ) = @{ mro::get_linear_isa($class) }; # spent 854µs making 45 calls to mro::get_linear_isa, avg 19µs/call | ||
| 181 | |||||
| 182 | 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 | |||||
| 199 | 45 | 186ms | $meta = $metaclass->initialize($class); # spent 186ms making 45 calls to Moose::Meta::Class::initialize, avg 4.14ms/call | ||
| 200 | } | ||||
| 201 | |||||
| 202 | 135 | 1.38ms | if (defined $meta_name) { | ||
| 203 | # also check for inherited non moose 'meta' method? | ||||
| 204 | 45 | 7.71ms | my $existing = $meta->get_method($meta_name); # spent 7.71ms making 45 calls to Class::MOP::Mixin::HasMethods::get_method, avg 171µs/call | ||
| 205 | 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 | } | ||||
| 214 | 45 | 119ms | $meta->_add_meta_method($meta_name); # spent 119ms making 45 calls to Class::MOP::Mixin::HasMethods::_add_meta_method, avg 2.65ms/call | ||
| 215 | } | ||||
| 216 | |||||
| 217 | # make sure they inherit from Moose::Object | ||||
| 218 | 90 | 250ms | $meta->superclasses($base_class) # spent 250ms making 90 calls to Moose::Meta::Class::superclasses, avg 2.77ms/call | ||
| 219 | unless $meta->superclasses(); | ||||
| 220 | |||||
| 221 | return $meta; | ||||
| 222 | } | ||||
| 223 | |||||
| 224 | # This may be used in some older MooseX extensions. | ||||
| 225 | sub _get_caller { | ||||
| 226 | goto &Moose::Exporter::_get_caller; | ||||
| 227 | } | ||||
| 228 | |||||
| 229 | ## make 'em all immutable | ||||
| 230 | |||||
| 231 | 22 | 135µs | $_->make_immutable( # spent 135µ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 | ||||
| 236 | 45 | 1.04ms | 44 | 421ms | ) for grep { $_->is_mutable } # spent 408ms making 22 calls to Class::MOP::Class::make_immutable, avg 18.6ms/call
# spent 12.2ms making 10 calls to Class::MOP::Object::meta, avg 1.22ms/call
# spent 151µs making 2 calls to Moose::Meta::Role::Method::Required::meta, avg 76µs/call
# spent 80µs making 1 call to Moose::Meta::Role::meta
# spent 77µs making 1 call to Moose::Meta::TypeCoercion::Union::meta
# spent 76µs making 1 call to Moose::Meta::Role::Application::ToRole::meta
# spent 70µs making 1 call to Class::MOP::Mixin::meta
# spent 69µs making 1 call to Moose::Meta::Role::Application::meta
# spent 69µs making 1 call to Moose::Meta::Role::Application::RoleSummation::meta
# spent 69µs making 1 call to Moose::Meta::TypeCoercion::meta
# spent 69µs making 1 call to Moose::Meta::Role::Application::ToInstance::meta
# spent 69µs making 1 call to Moose::Meta::Role::Composite::meta
# spent 68µs making 1 call to Moose::Meta::Role::Application::ToClass::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 | ||||
| 266 | 1 | 2µs | ); | ||
| 267 | |||||
| 268 | 1 | 25µs | 2 | 46.8ms | Moose::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 | |||||
| 273 | 1 | 55µs | 1; | ||
| 274 | |||||
| 275 | __END__ |