| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose.pm |
| Statements | Executed 1440 statements in 31.4ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 20.9ms | 30.1ms | Moose::BEGIN@15 |
| 1 | 1 | 1 | 13.0ms | 91.3ms | Moose::BEGIN@27 |
| 1 | 1 | 1 | 10.9ms | 109ms | Moose::BEGIN@19 |
| 1 | 1 | 1 | 10.9ms | 48.4ms | Moose::BEGIN@20 |
| 45 | 1 | 1 | 10.6ms | 697ms | Moose::init_meta |
| 100 | 51 | 27 | 6.68ms | 10.2s | Moose::has |
| 1 | 1 | 1 | 5.61ms | 11.8ms | Moose::BEGIN@30 |
| 1 | 1 | 1 | 4.32ms | 13.3ms | Moose::BEGIN@31 |
| 1 | 1 | 1 | 3.57ms | 7.45ms | Moose::BEGIN@32 |
| 1 | 1 | 1 | 3.56ms | 20.2ms | Moose::BEGIN@25 |
| 106 | 54 | 40 | 3.30ms | 5.36s | Moose::with (recurses: max depth 1, inclusive time 91.9ms) |
| 1 | 1 | 1 | 3.17ms | 13.7ms | Moose::BEGIN@28 |
| 1 | 1 | 1 | 2.67ms | 384ms | Moose::BEGIN@21 |
| 1 | 1 | 1 | 2.58ms | 10.3ms | Moose::BEGIN@29 |
| 1 | 1 | 1 | 1.54ms | 12.0ms | Moose::BEGIN@38 |
| 1 | 1 | 1 | 1.51ms | 7.64ms | Moose::BEGIN@33 |
| 1 | 1 | 1 | 984µs | 2.08ms | Moose::BEGIN@14 |
| 1 | 1 | 1 | 936µs | 10.4ms | Moose::BEGIN@23 |
| 6 | 4 | 4 | 260µs | 37.0ms | Moose::extends |
| 1 | 1 | 1 | 103µs | 122µs | Moose::BEGIN@2 |
| 1 | 1 | 1 | 92µs | 92µs | Moose::BEGIN@5 |
| 1 | 1 | 1 | 83µs | 8.74ms | Moose::BEGIN@35 |
| 1 | 1 | 1 | 79µs | 163µs | Moose::BEGIN@17 |
| 2 | 2 | 2 | 71µs | 4.07ms | Moose::around |
| 1 | 1 | 1 | 55µs | 230µs | Moose::BEGIN@11 |
| 1 | 1 | 1 | 40µs | 108µs | Moose::BEGIN@3 |
| 1 | 1 | 1 | 37µs | 167µs | Moose::BEGIN@12 |
| 1 | 1 | 1 | 27µs | 27µ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 | 106µs | 2 | 140µs | # spent 122µs (103+18) within Moose::BEGIN@2 which was called:
# once (103µs+18µs) by MooseX::Types::BEGIN@2 at line 2 # spent 122µs making 1 call to Moose::BEGIN@2
# spent 18µs making 1 call to strict::import |
| 3 | 3 | 287µs | 2 | 177µs | # spent 108µs (40+69) within Moose::BEGIN@3 which was called:
# once (40µ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 | 286µs | 1 | 92µs | # spent 92µs within Moose::BEGIN@5 which was called:
# once (92µs+0s) by MooseX::Types::BEGIN@2 at line 5 # spent 92µs making 1 call to Moose::BEGIN@5 |
| 6 | |||||
| 7 | 1 | 5µs | our $VERSION = '1.19'; | ||
| 8 | 1 | 71µs | $VERSION = eval $VERSION; # spent 11µs executing statements in string eval | ||
| 9 | 1 | 3µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 10 | |||||
| 11 | 3 | 117µs | 2 | 406µs | # spent 230µs (55+175) within Moose::BEGIN@11 which was called:
# once (55µs+175µs) by MooseX::Types::BEGIN@2 at line 11 # spent 230µs making 1 call to Moose::BEGIN@11
# spent 175µs making 1 call to Exporter::import |
| 12 | 3 | 94µs | 2 | 297µs | # spent 167µs (37+130) within Moose::BEGIN@12 which was called:
# once (37µs+130µs) by MooseX::Types::BEGIN@2 at line 12 # spent 167µs making 1 call to Moose::BEGIN@12
# spent 130µs making 1 call to Exporter::import |
| 13 | |||||
| 14 | 3 | 464µs | 2 | 2.12ms | # spent 2.08ms (984µs+1.10) within Moose::BEGIN@14 which was called:
# once (984µs+1.10ms) by MooseX::Types::BEGIN@2 at line 14 # spent 2.08ms making 1 call to Moose::BEGIN@14
# spent 36µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:61] |
| 15 | 3 | 571µs | 2 | 30.3ms | # spent 30.1ms (20.9+9.19) within Moose::BEGIN@15 which was called:
# once (20.9ms+9.19ms) by MooseX::Types::BEGIN@2 at line 15 # spent 30.1ms making 1 call to Moose::BEGIN@15
# spent 195µs making 1 call to Moose::Exporter::import |
| 16 | |||||
| 17 | 3 | 291µs | 2 | 247µs | # spent 163µs (79+84) within Moose::BEGIN@17 which was called:
# once (79µs+84µs) by MooseX::Types::BEGIN@2 at line 17 # spent 163µs making 1 call to Moose::BEGIN@17
# spent 84µs making 1 call to UNIVERSAL::VERSION |
| 18 | |||||
| 19 | 3 | 724µs | 1 | 109ms | # spent 109ms (10.9+97.6) within Moose::BEGIN@19 which was called:
# once (10.9ms+97.6ms) by MooseX::Types::BEGIN@2 at line 19 # spent 109ms making 1 call to Moose::BEGIN@19 |
| 20 | 3 | 663µs | 1 | 48.4ms | # spent 48.4ms (10.9+37.5) within Moose::BEGIN@20 which was called:
# once (10.9ms+37.5ms) by MooseX::Types::BEGIN@2 at line 20 # spent 48.4ms making 1 call to Moose::BEGIN@20 |
| 21 | 3 | 497µs | 1 | 384ms | # spent 384ms (2.67+381) within Moose::BEGIN@21 which was called:
# once (2.67ms+381ms) by MooseX::Types::BEGIN@2 at line 21 # spent 384ms making 1 call to Moose::BEGIN@21 |
| 22 | 3 | 90µs | 1 | 27µs | # spent 27µs within Moose::BEGIN@22 which was called:
# once (27µs+0s) by MooseX::Types::BEGIN@2 at line 22 # spent 27µs making 1 call to Moose::BEGIN@22 |
| 23 | 3 | 586µs | 1 | 10.4ms | # spent 10.4ms (936µs+9.43) within Moose::BEGIN@23 which was called:
# once (936µs+9.43ms) by MooseX::Types::BEGIN@2 at line 23 # spent 10.4ms making 1 call to Moose::BEGIN@23 |
| 24 | |||||
| 25 | 3 | 480µs | 1 | 20.2ms | # spent 20.2ms (3.56+16.6) within Moose::BEGIN@25 which was called:
# once (3.56ms+16.6ms) by MooseX::Types::BEGIN@2 at line 25 # spent 20.2ms making 1 call to Moose::BEGIN@25 |
| 26 | |||||
| 27 | 3 | 507µs | 1 | 91.3ms | # spent 91.3ms (13.0+78.3) within Moose::BEGIN@27 which was called:
# once (13.0ms+78.3ms) by MooseX::Types::BEGIN@2 at line 27 # spent 91.3ms making 1 call to Moose::BEGIN@27 |
| 28 | 3 | 574µs | 1 | 13.7ms | # spent 13.7ms (3.17+10.6) within Moose::BEGIN@28 which was called:
# once (3.17ms+10.6ms) by MooseX::Types::BEGIN@2 at line 28 # spent 13.7ms making 1 call to Moose::BEGIN@28 |
| 29 | 3 | 524µs | 1 | 10.3ms | # spent 10.3ms (2.58+7.75) within Moose::BEGIN@29 which was called:
# once (2.58ms+7.75ms) by MooseX::Types::BEGIN@2 at line 29 # spent 10.3ms making 1 call to Moose::BEGIN@29 |
| 30 | 3 | 519µs | 1 | 11.8ms | # spent 11.8ms (5.61+6.19) within Moose::BEGIN@30 which was called:
# once (5.61ms+6.19ms) by MooseX::Types::BEGIN@2 at line 30 # spent 11.8ms making 1 call to Moose::BEGIN@30 |
| 31 | 3 | 520µs | 1 | 13.3ms | # spent 13.3ms (4.32+9.03) within Moose::BEGIN@31 which was called:
# once (4.32ms+9.03ms) by MooseX::Types::BEGIN@2 at line 31 # spent 13.3ms making 1 call to Moose::BEGIN@31 |
| 32 | 3 | 510µs | 1 | 7.45ms | # spent 7.45ms (3.57+3.89) within Moose::BEGIN@32 which was called:
# once (3.57ms+3.89ms) by MooseX::Types::BEGIN@2 at line 32 # spent 7.45ms making 1 call to Moose::BEGIN@32 |
| 33 | 3 | 522µs | 1 | 7.64ms | # spent 7.64ms (1.51+6.13) within Moose::BEGIN@33 which was called:
# once (1.51ms+6.13ms) by MooseX::Types::BEGIN@2 at line 33 # spent 7.64ms making 1 call to Moose::BEGIN@33 |
| 34 | |||||
| 35 | 3 | 156µs | 2 | 17.4ms | # spent 8.74ms (83µs+8.66) within Moose::BEGIN@35 which was called:
# once (83µs+8.66ms) by MooseX::Types::BEGIN@2 at line 35 # spent 8.74ms making 1 call to Moose::BEGIN@35
# spent 8.66ms 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 | 12.0ms | # spent 12.0ms (1.54+10.5) within Moose::BEGIN@38 which was called:
# once (1.54ms+10.5ms) by MooseX::Types::BEGIN@2 at line 38 # spent 12.0ms making 1 call to Moose::BEGIN@38 |
| 39 | |||||
| 40 | sub throw_error { | ||||
| 41 | # FIXME This | ||||
| 42 | shift; | ||||
| 43 | goto \&confess | ||||
| 44 | } | ||||
| 45 | |||||
| 46 | # spent 37.0ms (260µs+36.7) within Moose::extends which was called 6 times, avg 6.16ms/call:
# 3 times (120µs+18.2ms) by Moose::extends at line 359 of Moose/Exporter.pm, avg 6.10ms/call
# once (65µs+7.81ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@7 at line 3 of MooseX/Role/Parameterized/Meta/Role/Parameterized.pm
# once (37µs+5.37ms) by MooseX::Role::Parameterized::BEGIN@8 at line 3 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (38µs+5.32ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@8 at line 3 of MooseX/Role/Parameterized/Meta/Parameter.pm | ||||
| 47 | 9 | 102µ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 | 18.2ms | $meta->superclasses(@_); # spent 18.2ms making 3 calls to Moose::Meta::Class::superclasses, avg 6.06ms/call | ||
| 55 | } | ||||
| 56 | |||||
| 57 | # spent 5.36s (3.30ms+5.36) within Moose::with which was called 106 times, avg 50.6ms/call:
# 53 times (1.12ms+2.63s) by Moose::with at line 359 of Moose/Exporter.pm, avg 49.7ms/call
# once (39µs+470ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@10 at line 13 of Markdent/Event/StartDocument.pm
# once (48µs+337ms) by Markdent::Simple::Document::BEGIN@9 at line 15 of Markdent/Handler/HTMLStream/Document.pm
# once (43µs+205ms) by Markdent::Parser::BEGIN@10 at line 36 of Markdent/Dialect/Standard/BlockParser.pm
# once (38µs+123ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 23 of Markdent/Event/EndCode.pm
# once (55µs+92.0ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@7 at line 4 of MooseX/Role/Parameterized/Meta/Role/Parameterized.pm
# once (49µs+87.2ms) by Markdent::Parser::BEGIN@11 at line 36 of Markdent/Dialect/Standard/SpanParser.pm
# once (41µs+41.0ms) by Markdent::Simple::Document::BEGIN@10 at line 21 of Markdent/Parser.pm
# once (39µs+39.7ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 25 of Markdent/Event/EndCode.pm
# once (52µs+37.8ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@24 at line 27 of Markdent/Event/StartHTMLTag.pm
# once (39µs+36.1ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 33 of Markdent/Event/Text.pm
# once (39µs+36.0ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 45 of Markdent/Event/Image.pm
# once (40µs+35.9ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@19 at line 13 of Markdent/Event/EndOrderedList.pm
# once (54µs+35.9ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@19 at line 21 of Markdent/Event/HTMLEntity.pm
# once (40µs+35.7ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@20 at line 27 of Markdent/Event/HTMLTag.pm
# once (39µs+35.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 39 of Markdent/Event/StartLink.pm
# once (42µs+35.4ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@13 at line 13 of Markdent/Event/EndBlockquote.pm
# once (38µs+35.4ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@12 at line 21 of Markdent/Event/AutoLink.pm
# once (41µs+35.3ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@24 at line 13 of Markdent/Event/HorizontalRule.pm
# once (40µs+35.3ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@15 at line 21 of Markdent/Event/EndHTMLTag.pm
# once (40µs+35.3ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@26 at line 21 of Markdent/Event/HTMLCommentBlock.pm
# once (38µs+35.3ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 21 of Markdent/Event/StartEmphasis.pm
# once (39µs+35.3ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@16 at line 13 of Markdent/Event/EndLink.pm
# once (38µs+35.2ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 21 of Markdent/Event/EndEmphasis.pm
# once (53µs+35.2ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 21 of Markdent/Event/StartCode.pm
# once (39µs+35.2ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@18 at line 21 of Markdent/Event/HTMLComment.pm
# once (43µs+35.2ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@25 at line 21 of Markdent/Event/HTMLBlock.pm
# once (38µs+35.2ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 21 of Markdent/Event/EndStrong.pm
# once (40µs+35.1ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@27 at line 21 of Markdent/Event/Preformatted.pm
# once (39µs+35.1ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 21 of Markdent/Event/EndCode.pm
# once (39µs+35.1ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@17 at line 13 of Markdent/Event/EndListItem.pm
# once (39µs+35.1ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@14 at line 21 of Markdent/Event/StartHeader.pm
# once (44µs+35.0ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 21 of Markdent/Event/StartStrong.pm
# once (39µs+35.0ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@15 at line 21 of Markdent/Event/EndHeader.pm
# once (40µs+35.0ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@21 at line 13 of Markdent/Event/EndParagraph.pm
# once (40µs+34.7ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@23 at line 13 of Markdent/Event/EndUnorderedList.pm
# once (41µs+34.7ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@22 at line 13 of Markdent/Event/StartUnorderedList.pm
# once (39µs+34.7ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@20 at line 13 of Markdent/Event/StartParagraph.pm
# once (39µs+34.7ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@16 at line 13 of Markdent/Event/StartListItem.pm
# once (41µs+34.7ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@18 at line 13 of Markdent/Event/StartOrderedList.pm
# once (40µs+34.6ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@12 at line 13 of Markdent/Event/StartBlockquote.pm
# once (40µs+34.5ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@11 at line 13 of Markdent/Event/EndDocument.pm
# once (45µs+21.1ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 23 of Markdent/Event/EndStrong.pm
# once (38µs+20.9ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 23 of Markdent/Event/StartCode.pm
# once (38µs+20.8ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 23 of Markdent/Event/EndEmphasis.pm
# once (41µs+20.7ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 23 of Markdent/Event/StartStrong.pm
# once (38µs+20.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 23 of Markdent/Event/StartEmphasis.pm
# once (39µs+20.0ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@16 at line 15 of Markdent/Event/EndLink.pm
# once (40µs+20.0ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 41 of Markdent/Event/StartLink.pm
# once (52µs+5.18ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 25 of Markdent/Event/EndStrong.pm
# once (38µs+5.15ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 25 of Markdent/Event/EndEmphasis.pm
# once (38µs+5.05ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 25 of Markdent/Event/StartEmphasis.pm
# once (38µs+5.01ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 25 of Markdent/Event/StartStrong.pm
# once (39µs+5.01ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 25 of Markdent/Event/StartCode.pm | ||||
| 58 | 53 | 1.17ms | 53 | 2.63s | Moose::Util::apply_all_roles(shift, @_); # spent 2.72s making 53 calls to Moose::Util::apply_all_roles, avg 51.4ms/call, recursion: max depth 1, sum of overlapping time 91.9ms |
| 59 | } | ||||
| 60 | |||||
| 61 | # spent 10.2s (6.68ms+10.2) within Moose::has which was called 100 times, avg 102ms/call:
# 50 times (4.57ms+5.10s) by Moose::has at line 359 of Moose/Exporter.pm, avg 102ms/call
# once (43µs+1.71s) by Markdent::Parser::BEGIN@11 at line 43 of Markdent/Dialect/Standard/SpanParser.pm
# once (45µs+1.19s) by Markdent::Parser::BEGIN@10 at line 43 of Markdent/Dialect/Standard/BlockParser.pm
# once (42µs+820ms) by Markdent::Parser::BEGIN@11 at line 51 of Markdent/Dialect/Standard/SpanParser.pm
# once (40µs+472ms) by Markdent::Parser::BEGIN@10 at line 50 of Markdent/Dialect/Standard/BlockParser.pm
# once (40µs+442ms) by Markdent::Parser::BEGIN@10 at line 62 of Markdent/Dialect/Standard/BlockParser.pm
# once (43µs+32.9ms) by Markdent::Parser::BEGIN@11 at line 69 of Markdent/Dialect/Standard/SpanParser.pm
# once (41µs+17.0ms) by Markdent::Simple::Document::BEGIN@10 at line 44 of Markdent/Parser.pm
# once (40µs+17.0ms) by Markdent::Simple::Document::BEGIN@10 at line 51 of Markdent/Parser.pm
# once (45µs+16.9ms) by Markdent::Simple::Document::BEGIN@10 at line 23 of Markdent/Parser.pm
# once (41µs+16.9ms) by Markdent::Simple::Document::BEGIN@10 at line 38 of Markdent/Parser.pm
# once (41µs+14.0ms) by MooseX::Role::Parameterized::BEGIN@8 at line 32 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (42µs+14.0ms) by Markdent::Parser::BEGIN@11 at line 84 of Markdent/Dialect/Standard/SpanParser.pm
# once (41µs+13.9ms) by Markdent::Simple::Document::BEGIN@10 at line 57 of Markdent/Parser.pm
# once (43µs+13.7ms) by Markdent::Simple::Document::BEGIN@10 at line 30 of Markdent/Parser.pm
# once (42µs+13.7ms) by Markdent::Parser::BEGIN@11 at line 76 of Markdent/Dialect/Standard/SpanParser.pm
# once (37µs+13.0ms) by MooseX::Role::Parameterized::BEGIN@8 at line 37 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (51µs+12.2ms) by Markdent::Simple::Document::BEGIN@9 at line 17 of Markdent/Handler/HTMLStream/Document.pm
# once (40µs+10.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 27 of Markdent/Event/Text.pm
# once (44µs+10.6ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 27 of Markdent/Event/Image.pm
# once (43µs+10.5ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 21 of Markdent/Event/Text.pm
# once (40µs+10.5ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 27 of Markdent/Event/StartLink.pm
# once (40µs+10.4ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 33 of Markdent/Event/Image.pm
# once (39µs+10.4ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 21 of Markdent/Event/StartLink.pm
# once (40µs+9.53ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@20 at line 25 of Markdent/Event/HTMLTag.pm
# once (40µs+9.00ms) by MooseX::Role::Parameterized::BEGIN@8 at line 14 of MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
# once (48µs+8.93ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@19 at line 15 of Markdent/Event/HTMLEntity.pm
# once (43µs+8.21ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@24 at line 25 of Markdent/Event/StartHTMLTag.pm
# once (39µs+7.90ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 39 of Markdent/Event/Image.pm
# once (39µs+7.86ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 33 of Markdent/Event/StartLink.pm
# once (41µs+7.85ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 21 of Markdent/Event/Image.pm
# once (43µs+7.71ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@13 at line 15 of Markdent/Event/EndCode.pm
# once (42µs+7.71ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@17 at line 15 of Markdent/Event/EndStrong.pm
# once (43µs+7.70ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@23 at line 15 of Markdent/Event/StartEmphasis.pm
# once (42µs+7.69ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@18 at line 15 of Markdent/Event/HTMLComment.pm
# once (49µs+7.69ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@22 at line 15 of Markdent/Event/StartCode.pm
# once (42µs+7.69ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@24 at line 15 of Markdent/Event/StartHTMLTag.pm
# once (44µs+7.69ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@15 at line 15 of Markdent/Event/EndHTMLTag.pm
# once (42µs+7.68ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@14 at line 15 of Markdent/Event/EndEmphasis.pm
# once (41µs+7.67ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@25 at line 15 of Markdent/Event/StartLink.pm
# once (43µs+7.67ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@21 at line 15 of Markdent/Event/Image.pm
# once (42µs+7.66ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@20 at line 15 of Markdent/Event/HTMLTag.pm
# once (48µs+7.65ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@25 at line 15 of Markdent/Event/HTMLBlock.pm
# once (42µs+7.65ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@26 at line 15 of Markdent/Event/HTMLCommentBlock.pm
# once (42µs+7.64ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@26 at line 15 of Markdent/Event/StartStrong.pm
# once (43µs+7.64ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@27 at line 15 of Markdent/Event/Text.pm
# once (42µs+7.64ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@27 at line 15 of Markdent/Event/Preformatted.pm
# once (42µs+7.61ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@15 at line 15 of Markdent/Event/EndHeader.pm
# once (44µs+7.57ms) by Markdent::Dialect::Standard::SpanParser::BEGIN@12 at line 15 of Markdent/Event/AutoLink.pm
# once (42µs+7.56ms) by Markdent::Dialect::Standard::BlockParser::BEGIN@14 at line 15 of Markdent/Event/StartHeader.pm
# once (39µs+5.41ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@8 at line 9 of MooseX/Role/Parameterized/Meta/Parameter.pm | ||||
| 62 | 350 | 4.38ms | 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.12ms | my %options = ( definition_context => Moose::Util::_caller_info(), @_ ); # spent 2.12ms making 50 calls to Moose::Util::_caller_info, avg 42µs/call | ||
| 69 | my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ]; | ||||
| 70 | 50 | 5.10s | $meta->add_attribute( $_, %options ) for @$attrs; # spent 5.10s making 50 calls to Moose::Meta::Class::add_attribute, avg 102ms/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 4.07ms (71µs+4.00) within Moose::around which was called 2 times, avg 2.04ms/call:
# once (46µs+2.04ms) by MooseX::Role::Parameterized::Meta::Role::Parameterizable::BEGIN@8 at line 20 of MooseX/Role/Parameterized/Meta/Parameter.pm
# once (25µs+1.96ms) by Moose::around at line 359 of Moose/Exporter.pm | ||||
| 82 | 1 | 25µs | 1 | 1.96ms | Moose::Util::add_method_modifier(shift, 'around', \@_); # spent 1.96ms 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 | 3µ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 | 36µs | 1 | 4.74ms | Moose::Exporter->setup_import_methods( # spent 4.74ms 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 697ms (10.6+686) within Moose::init_meta which was called 45 times, avg 15.5ms/call:
# 45 times (10.6ms+686ms) by Moose::Exporter::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Exporter.pm:456] at line 423 of Moose/Exporter.pm, avg 15.5ms/call | ||||
| 134 | # This used to be called as a function. This hack preserves | ||||
| 135 | # backwards compatibility. | ||||
| 136 | 630 | 7.19ms | 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 | 504µs | Moose->throw_error("The Metaclass $metaclass must be a subclass of Moose::Meta::Class.") # spent 504µs making 45 calls to UNIVERSAL::isa, avg 11µs/call | ||
| 159 | unless $metaclass->isa('Moose::Meta::Class'); | ||||
| 160 | |||||
| 161 | # make a subtype for each Moose class | ||||
| 162 | 90 | 41.5ms | class_type($class) # spent 37.2ms making 45 calls to Moose::Util::TypeConstraints::class_type, avg 827µs/call
# spent 4.26ms making 45 calls to Moose::Util::TypeConstraints::find_type_constraint, avg 95µs/call | ||
| 163 | unless find_type_constraint($class); | ||||
| 164 | |||||
| 165 | my $meta; | ||||
| 166 | |||||
| 167 | 135 | 2.51ms | 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 | 821µs | my ( undef, @isa ) = @{ mro::get_linear_isa($class) }; # spent 821µs making 45 calls to mro::get_linear_isa, avg 18µ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 | 213ms | $meta = $metaclass->initialize($class); # spent 213ms making 45 calls to Moose::Meta::Class::initialize, avg 4.74ms/call | ||
| 200 | } | ||||
| 201 | |||||
| 202 | 135 | 1.37ms | if (defined $meta_name) { | ||
| 203 | # also check for inherited non moose 'meta' method? | ||||
| 204 | 45 | 13.1ms | my $existing = $meta->get_method($meta_name); # spent 13.1ms making 45 calls to Class::MOP::Mixin::HasMethods::get_method, avg 291µ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 | 125ms | $meta->_add_meta_method($meta_name); # spent 125ms making 45 calls to Class::MOP::Mixin::HasMethods::_add_meta_method, avg 2.79ms/call | ||
| 215 | } | ||||
| 216 | |||||
| 217 | # make sure they inherit from Moose::Object | ||||
| 218 | 90 | 291ms | $meta->superclasses($base_class) # spent 291ms making 90 calls to Moose::Meta::Class::superclasses, avg 3.24ms/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 | 137µs | $_->make_immutable( # spent 137µ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.08ms | 44 | 319ms | ) for grep { $_->is_mutable } # spent 305ms making 22 calls to Class::MOP::Class::make_immutable, avg 13.9ms/call
# spent 13.4ms making 10 calls to Class::MOP::Object::meta, avg 1.34ms/call
# spent 148µs making 2 calls to Moose::Meta::Role::Method::Required::meta, avg 74µs/call
# spent 81µs making 1 call to Moose::Meta::Role::meta
# spent 78µs making 1 call to Moose::Meta::TypeCoercion::Union::meta
# spent 77µ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::Composite::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 68µs making 1 call to Moose::Meta::Role::Application::ToClass::meta
# spent 68µs making 1 call to Moose::Meta::Role::Application::ToInstance::meta
# spent 68µs making 1 call to Moose::Meta::Role::Application::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 | 24µs | 2 | 35.1ms | Moose::Meta::Mixin::AttributeCore->meta->make_immutable( # spent 35.0ms making 1 call to Class::MOP::Class::make_immutable
# spent 76µs making 1 call to Class::MOP::Mixin::meta |
| 269 | inline_constructor => 0, | ||||
| 270 | constructor_name => undef, | ||||
| 271 | ); | ||||
| 272 | |||||
| 273 | 1 | 58µs | 1; | ||
| 274 | |||||
| 275 | __END__ |