| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Role.pm |
| Statements | Executed 1685 statements in 22.0ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 83 | 2 | 2 | 13.9ms | 416ms | Moose::Role::init_meta |
| 138 | 70 | 70 | 4.33ms | 5.93s | Moose::Role::with (recurses: max depth 3, inclusive time 895ms) |
| 18 | 10 | 7 | 1.08ms | 12.3ms | Moose::Role::has |
| 28 | 15 | 8 | 735µs | 7.13ms | Moose::Role::around |
| 28 | 2 | 1 | 667µs | 7.40ms | Moose::Role::super |
| 18 | 10 | 10 | 619µs | 6.16ms | Moose::Role::requires |
| 19 | 3 | 1 | 501µs | 3.79ms | Moose::Role::_add_method_modifier |
| 8 | 5 | 3 | 261µs | 3.39ms | Moose::Role::override |
| 6 | 4 | 3 | 170µs | 1.69ms | Moose::Role::before |
| 4 | 3 | 3 | 117µs | 1.09ms | Moose::Role::after |
| 1 | 1 | 1 | 67µs | 86µs | Moose::Role::BEGIN@2 |
| 1 | 1 | 1 | 59µs | 849µs | Moose::Role::BEGIN@8 |
| 1 | 1 | 1 | 46µs | 277µs | Moose::Role::BEGIN@6 |
| 1 | 1 | 1 | 45µs | 8.18ms | Moose::Role::BEGIN@19 |
| 1 | 1 | 1 | 40µs | 107µs | Moose::Role::BEGIN@3 |
| 1 | 1 | 1 | 36µs | 196µs | Moose::Role::BEGIN@5 |
| 1 | 1 | 1 | 34µs | 170µs | Moose::Role::BEGIN@17 |
| 1 | 1 | 1 | 25µs | 25µs | Moose::Role::BEGIN@14 |
| 1 | 1 | 1 | 24µs | 24µs | Moose::Role::BEGIN@18 |
| 1 | 1 | 1 | 20µs | 20µs | Moose::Role::BEGIN@15 |
| 0 | 0 | 0 | 0s | 0s | Moose::Role::augment |
| 0 | 0 | 0 | 0s | 0s | Moose::Role::excludes |
| 0 | 0 | 0 | 0s | 0s | Moose::Role::extends |
| 0 | 0 | 0 | 0s | 0s | Moose::Role::inner |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Moose::Role; | ||||
| 2 | 3 | 188µs | 2 | 106µs | # spent 86µs (67+20) within Moose::Role::BEGIN@2 which was called:
# once (67µs+20µs) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 2 # spent 86µs making 1 call to Moose::Role::BEGIN@2
# spent 20µs making 1 call to strict::import |
| 3 | 3 | 100µs | 2 | 174µs | # spent 107µs (40+67) within Moose::Role::BEGIN@3 which was called:
# once (40µs+67µs) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 3 # spent 107µs making 1 call to Moose::Role::BEGIN@3
# spent 67µs making 1 call to warnings::import |
| 4 | |||||
| 5 | 3 | 101µs | 2 | 356µs | # spent 196µs (36+160) within Moose::Role::BEGIN@5 which was called:
# once (36µs+160µs) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 5 # spent 196µs making 1 call to Moose::Role::BEGIN@5
# spent 160µs making 1 call to Exporter::import |
| 6 | 3 | 166µs | 2 | 509µs | # spent 277µs (46+231) within Moose::Role::BEGIN@6 which was called:
# once (46µs+231µs) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 6 # spent 277µs making 1 call to Moose::Role::BEGIN@6
# spent 231µs making 1 call to Exporter::import |
| 7 | |||||
| 8 | 3 | 251µs | 2 | 1.64ms | # spent 849µs (59+790) within Moose::Role::BEGIN@8 which was called:
# once (59µs+790µs) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 8 # spent 849µs making 1 call to Moose::Role::BEGIN@8
# spent 790µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756] |
| 9 | |||||
| 10 | 1 | 6µs | our $VERSION = '1.19'; | ||
| 11 | 1 | 70µs | $VERSION = eval $VERSION; # spent 11µs executing statements in string eval | ||
| 12 | 1 | 3µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 13 | |||||
| 14 | 3 | 84µs | 1 | 25µs | # spent 25µs within Moose::Role::BEGIN@14 which was called:
# once (25µs+0s) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 14 # spent 25µs making 1 call to Moose::Role::BEGIN@14 |
| 15 | 3 | 82µs | 1 | 20µs | # spent 20µs within Moose::Role::BEGIN@15 which was called:
# once (20µs+0s) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 15 # spent 20µs making 1 call to Moose::Role::BEGIN@15 |
| 16 | |||||
| 17 | 3 | 96µs | 2 | 306µs | # spent 170µs (34+136) within Moose::Role::BEGIN@17 which was called:
# once (34µs+136µs) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 17 # spent 170µs making 1 call to Moose::Role::BEGIN@17
# spent 136µs making 1 call to Moose::Exporter::import |
| 18 | 3 | 105µs | 1 | 24µs | # spent 24µs within Moose::Role::BEGIN@18 which was called:
# once (24µs+0s) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 18 # spent 24µs making 1 call to Moose::Role::BEGIN@18 |
| 19 | 3 | 2.47ms | 2 | 16.3ms | # spent 8.18ms (45µs+8.14) within Moose::Role::BEGIN@19 which was called:
# once (45µs+8.14ms) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@9 at line 19 # spent 8.18ms making 1 call to Moose::Role::BEGIN@19
# spent 8.14ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 20 | |||||
| 21 | sub extends { | ||||
| 22 | croak "Roles do not support 'extends' (you can use 'with' to specialize a role)"; | ||||
| 23 | } | ||||
| 24 | |||||
| 25 | # spent 5.93s (4.33ms+5.93) within Moose::Role::with which was called 138 times, avg 43.0ms/call:
# 69 times (1.49ms+2.51s) by Moose::Role::with at line 359 of Moose/Exporter.pm, avg 36.4ms/call
# once (42µs+420ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@9 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/accessor.pm
# once (40µs+313ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@9 at line 12 of Moose/Meta/Method/Accessor/Native/Array/accessor.pm
# once (40µs+234ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 15 of Moose/Meta/Method/Accessor/Native/Hash/set.pm
# once (40µs+176ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Moose/Meta/Method/Accessor/Native/Hash/Writer.pm
# once (39µs+149ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Moose/Meta/Method/Accessor/Native/Array/set.pm
# once (40µs+110ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Markdent/Role/BlockParser.pm
# once (42µs+88.1ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Moose/Meta/Method/Accessor/Native/Array/Writer.pm
# once (42µs+75.5ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 20 of Markdent/Role/HTMLStream.pm
# once (41µs+66.4ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Moose/Meta/Method/Accessor/Native/Hash/get.pm
# once (38µs+60.3ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Markdent/Role/AnyParser.pm
# once (40µs+53.7ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@17 at line 14 of Moose/Meta/Method/Accessor/Native/String/substr.pm
# once (39µs+51.5ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Array/delete.pm
# once (41µs+49.3ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 23 of Moose/Meta/Attribute/Native/Trait/Hash.pm
# once (40µs+47.0ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@23 at line 12 of Moose/Meta/Method/Accessor/Native/Array/push.pm
# once (40µs+46.7ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@30 at line 14 of Moose/Meta/Method/Accessor/Native/Array/sort_in_place.pm
# once (38µs+46.7ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@32 at line 12 of Moose/Meta/Method/Accessor/Native/Array/unshift.pm
# once (41µs+46.0ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@10 at line 12 of Moose/Meta/Method/Accessor/Native/Array/clear.pm
# once (40µs+45.8ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@22 at line 12 of Moose/Meta/Method/Accessor/Native/Array/pop.pm
# once (41µs+45.3ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@26 at line 12 of Moose/Meta/Method/Accessor/Native/Array/shift.pm
# once (40µs+45.1ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@28 at line 12 of Moose/Meta/Method/Accessor/Native/Array/splice.pm
# once (39µs+44.5ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@17 at line 12 of Moose/Meta/Method/Accessor/Native/Array/insert.pm
# once (41µs+42.8ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@13 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/delete.pm
# once (42µs+42.1ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@10 at line 12 of Moose/Meta/Method/Accessor/Native/Hash/clear.pm
# once (40µs+40.7ms) by Moose::Meta::Attribute::Native::Trait::Counter::BEGIN@10 at line 12 of Moose/Meta/Method/Accessor/Native/Counter/inc.pm
# once (42µs+38.3ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Moose/Meta/Method/Accessor/Native/Writer.pm
# once (48µs+37.5ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Markdent/Role/EventsAsMethods.pm
# once (43µs+37.2ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@11 at line 12 of Moose/Meta/Method/Accessor/Native/String/clear.pm
# once (40µs+34.4ms) by Moose::Meta::Attribute::Native::Trait::Counter::BEGIN@11 at line 12 of Moose/Meta/Method/Accessor/Native/Counter/reset.pm
# once (39µs+34.1ms) by Moose::Meta::Attribute::Native::Trait::Bool::BEGIN@10 at line 12 of Moose/Meta/Method/Accessor/Native/Bool/toggle.pm
# once (41µs+33.0ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/String/inc.pm
# once (39µs+32.9ms) by Moose::Meta::Attribute::Native::Trait::Bool::BEGIN@11 at line 12 of Moose/Meta/Method/Accessor/Native/Bool/unset.pm
# once (40µs+32.9ms) by Moose::Meta::Attribute::Native::Trait::Counter::BEGIN@9 at line 12 of Moose/Meta/Method/Accessor/Native/Counter/dec.pm
# once (40µs+32.9ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@10 at line 12 of Moose/Meta/Method/Accessor/Native/String/chop.pm
# once (38µs+32.8ms) by Moose::Meta::Attribute::Native::Trait::Bool::BEGIN@9 at line 12 of Moose/Meta/Method/Accessor/Native/Bool/set.pm
# once (39µs+32.8ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@9 at line 12 of Moose/Meta/Method/Accessor/Native/String/chomp.pm
# once (40µs+32.5ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@15 at line 12 of Moose/Meta/Method/Accessor/Native/String/prepend.pm
# once (40µs+32.5ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@8 at line 12 of Moose/Meta/Method/Accessor/Native/String/append.pm
# once (40µs+32.3ms) by Moose::Meta::Attribute::Native::Trait::Counter::BEGIN@12 at line 12 of Moose/Meta/Method/Accessor/Native/Counter/set.pm
# once (41µs+31.4ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@15 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/exists.pm
# once (40µs+31.3ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@16 at line 15 of Moose/Meta/Method/Accessor/Native/String/replace.pm
# once (41µs+31.0ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Moose/Meta/Method/Accessor/Native/Array/get.pm
# once (41µs+30.5ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@12 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/defined.pm
# once (51µs+22.4ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@14 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/elements.pm
# once (39µs+19.9ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@27 at line 14 of Moose/Meta/Method/Accessor/Native/Array/shuffle.pm
# once (43µs+19.5ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@13 at line 12 of Moose/Meta/Method/Accessor/Native/String/length.pm
# once (39µs+19.5ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@31 at line 14 of Moose/Meta/Method/Accessor/Native/Array/uniq.pm
# once (39µs+19.5ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@13 at line 12 of Moose/Meta/Method/Accessor/Native/Array/elements.pm
# once (39µs+19.4ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@11 at line 12 of Moose/Meta/Method/Accessor/Native/Array/count.pm
# once (41µs+19.4ms) by Moose::Meta::Attribute::Native::Trait::Bool::BEGIN@8 at line 12 of Moose/Meta/Method/Accessor/Native/Bool/not.pm
# once (75µs+19.4ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@11 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/count.pm
# once (42µs+19.4ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@18 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/keys.pm
# once (41µs+19.4ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@19 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/kv.pm
# once (40µs+19.3ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@18 at line 12 of Moose/Meta/Method/Accessor/Native/Array/is_empty.pm
# once (42µs+19.3ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@17 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm
# once (41µs+19.2ms) by Moose::Meta::Attribute::Native::Trait::Hash::BEGIN@21 at line 14 of Moose/Meta/Method/Accessor/Native/Hash/values.pm
# once (40µs+18.9ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@14 at line 15 of Moose/Meta/Method/Accessor/Native/Array/first.pm
# once (39µs+18.7ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@29 at line 14 of Moose/Meta/Method/Accessor/Native/Array/sort.pm
# once (39µs+18.0ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@19 at line 14 of Moose/Meta/Method/Accessor/Native/Array/join.pm
# once (39µs+17.9ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@24 at line 15 of Moose/Meta/Method/Accessor/Native/Array/reduce.pm
# once (39µs+17.9ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@16 at line 14 of Moose/Meta/Method/Accessor/Native/Array/grep.pm
# once (40µs+17.8ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@20 at line 14 of Moose/Meta/Method/Accessor/Native/Array/map.pm
# once (40µs+17.7ms) by Moose::Meta::Attribute::Native::Trait::String::BEGIN@14 at line 15 of Moose/Meta/Method/Accessor/Native/String/match.pm
# once (39µs+17.0ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@21 at line 15 of Moose/Meta/Method/Accessor/Native/Array/natatime.pm
# once (42µs+14.1ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Moose/Meta/Method/Accessor/Native/Reader.pm
# once (44µs+12.3ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 19 of Moose/Meta/Attribute/Native/Trait/String.pm
# once (38µs+12.1ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 34 of Moose/Meta/Attribute/Native/Trait/Array.pm
# once (38µs+12.1ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 13 of Moose/Meta/Attribute/Native/Trait/Bool.pm
# once (40µs+11.5ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Moose/Meta/Attribute/Native/Trait/Counter.pm
# once (49µs+11.1ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Markdent/Role/SpanParser.pm | ||||
| 26 | 69 | 1.39ms | 69 | 2.32s | Moose::Util::apply_all_roles( shift, @_ ); # spent 3.41s making 69 calls to Moose::Util::apply_all_roles, avg 49.4ms/call, recursion: max depth 3, sum of overlapping time 1.09s |
| 27 | } | ||||
| 28 | |||||
| 29 | # spent 6.16ms (619µs+5.54) within Moose::Role::requires which was called 18 times, avg 342µs/call:
# 9 times (260µs+2.38ms) by Moose::Role::requires at line 359 of Moose/Exporter.pm, avg 294µs/call
# once (46µs+529µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Markdent/Role/Handler.pm
# once (37µs+442µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 22 of Markdent/Role/HTMLStream.pm
# once (41µs+386µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Moose/Meta/Method/Accessor/Native/Collection.pm
# once (43µs+347µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 13 of Moose/Meta/Attribute/Native/Trait.pm
# once (39µs+300µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 of Markdent/Role/EventAsText.pm
# once (39µs+293µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Markdent/Role/SpanParser.pm
# once (39µs+287µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Moose/Meta/Method/Accessor/Native/Reader.pm
# once (38µs+288µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 16 of Moose/Meta/Method/Accessor/Native/Writer.pm
# once (37µs+287µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Markdent/Role/BlockParser.pm | ||||
| 30 | 27 | 271µs | my $meta = shift; | ||
| 31 | croak "Must specify at least one method" unless @_; | ||||
| 32 | 9 | 2.38ms | $meta->add_required_methods(@_); # spent 2.38ms making 9 calls to Moose::Meta::Role::add_required_methods, avg 265µs/call | ||
| 33 | } | ||||
| 34 | |||||
| 35 | sub excludes { | ||||
| 36 | my $meta = shift; | ||||
| 37 | croak "Must specify at least one role" unless @_; | ||||
| 38 | $meta->add_excluded_roles(@_); | ||||
| 39 | } | ||||
| 40 | |||||
| 41 | # spent 12.3ms (1.08+11.2) within Moose::Role::has which was called 18 times, avg 684µs/call:
# 9 times (728µs+5.03ms) by Moose::Role::has at line 359 of Moose/Exporter.pm, avg 639µs/call
# once (47µs+915µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 24 of Markdent/Role/HTMLStream.pm
# once (40µs+774µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 15 of Moose/Meta/Attribute/Native/Trait.pm
# once (40µs+683µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Markdent/Role/DebugPrinter.pm
# once (39µs+672µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 8 of MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm
# once (41µs+648µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of Markdent/Role/AnyParser.pm
# once (41µs+644µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 16 of Markdent/Role/BlockParser.pm
# once (36µs+634µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 37 of Markdent/Role/HTMLStream.pm
# once (37µs+631µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 190 of Moose/Meta/Attribute/Native/Trait.pm
# once (34µs+603µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 14 of MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm | ||||
| 42 | 63 | 681µs | my $meta = shift; | ||
| 43 | my $name = shift; | ||||
| 44 | croak 'Usage: has \'name\' => ( key => value, ... )' if @_ == 1; | ||||
| 45 | 9 | 371µs | my %options = ( definition_context => Moose::Util::_caller_info(), @_ ); # spent 371µs making 9 calls to Moose::Util::_caller_info, avg 41µs/call | ||
| 46 | my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ]; | ||||
| 47 | 9 | 4.65ms | $meta->add_attribute( $_, %options ) for @$attrs; # spent 4.65ms making 9 calls to Moose::Meta::Role::add_attribute, avg 517µs/call | ||
| 48 | } | ||||
| 49 | |||||
| 50 | # spent 3.79ms (501µs+3.29) within Moose::Role::_add_method_modifier which was called 19 times, avg 199µs/call:
# 14 times (364µs+2.36ms) by Moose::Role::around at line 66, avg 194µs/call
# 3 times (83µs+569µs) by Moose::Role::before at line 62, avg 217µs/call
# 2 times (54µs+362µs) by Moose::Role::after at line 64, avg 208µs/call | ||||
| 51 | 76 | 524µs | my $type = shift; | ||
| 52 | my $meta = shift; | ||||
| 53 | |||||
| 54 | if ( ref($_[0]) eq 'Regexp' ) { | ||||
| 55 | croak "Roles do not currently support regex " | ||||
| 56 | . " references for $type method modifiers"; | ||||
| 57 | } | ||||
| 58 | |||||
| 59 | 19 | 3.29ms | Moose::Util::add_method_modifier($meta, $type, \@_); # spent 3.29ms making 19 calls to Moose::Util::add_method_modifier, avg 173µs/call | ||
| 60 | } | ||||
| 61 | |||||
| 62 | 3 | 53µs | 3 | 652µs | # spent 1.69ms (170µs+1.52) within Moose::Role::before which was called 6 times, avg 282µs/call:
# 3 times (59µs+652µs) by Moose::Role::before at line 359 of Moose/Exporter.pm, avg 237µs/call
# once (44µs+321µs) by MooseX::SemiAffordanceAccessor::BEGIN@12 at line 34 of MooseX/SemiAffordanceAccessor/Role/Attribute.pm
# once (37µs+274µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 51 of Moose/Meta/Attribute/Native/Trait.pm
# once (31µs+274µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 101 of Moose/Meta/Attribute/Native/Trait.pm # spent 652µs making 3 calls to Moose::Role::_add_method_modifier, avg 217µs/call |
| 63 | |||||
| 64 | 2 | 37µs | 2 | 416µs | # spent 1.09ms (117µs+976µs) within Moose::Role::after which was called 4 times, avg 273µs/call:
# 2 times (40µs+416µs) by Moose::Role::after at line 359 of Moose/Exporter.pm, avg 228µs/call
# once (44µs+308µs) by MooseX::StrictConstructor::BEGIN@12 at line 30 of MooseX/StrictConstructor/Role/Object.pm
# once (33µs+252µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 83 of Moose/Meta/Attribute/Native/Trait.pm # spent 416µs making 2 calls to Moose::Role::_add_method_modifier, avg 208µs/call |
| 65 | |||||
| 66 | 14 | 220µs | 14 | 2.72ms | # spent 7.13ms (735µs+6.39) within Moose::Role::around which was called 28 times, avg 255µs/call:
# 14 times (250µs+2.72ms) by Moose::Role::around at line 359 of Moose/Exporter.pm, avg 212µs/call
# once (40µs+338µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 33 of Moose/Meta/Method/Accessor/Native.pm
# once (47µs+308µs) by MooseX::StrictConstructor::BEGIN@13 at line 39 of MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
# once (36µs+281µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 27 of Moose/Meta/Method/Accessor/Native/Collection.pm
# once (37µs+275µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 41 of Moose/Meta/Method/Accessor/Native/Hash/set.pm
# once (31µs+274µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 59 of Moose/Meta/Method/Accessor/Native/Collection.pm
# once (37µs+260µs) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@17 at line 48 of Moose/Meta/Method/Accessor/Native/Array/insert.pm
# once (38µs+258µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 55 of Moose/Meta/Method/Accessor/Native/Array/set.pm
# once (35µs+250µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 136 of Moose/Meta/Attribute/Native/Trait.pm
# once (30µs+251µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 158 of Moose/Meta/Attribute/Native/Trait.pm
# once (31µs+241µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 76 of Moose/Meta/Method/Accessor/Native/Collection.pm
# once (32µs+240µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 41 of Moose/Meta/Method/Accessor/Native.pm
# once (30µs+237µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 128 of Moose/Meta/Method/Accessor/Native/Collection.pm
# once (30µs+235µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 145 of Moose/Meta/Method/Accessor/Native/Collection.pm
# once (30µs+221µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 78 of Moose/Meta/Method/Accessor/Native/Hash/set.pm # spent 2.72ms making 14 calls to Moose::Role::_add_method_modifier, avg 194µs/call |
| 67 | |||||
| 68 | # see Moose.pm for discussion | ||||
| 69 | # spent 7.40ms (667µs+6.74) within Moose::Role::super which was called 28 times, avg 264µs/call:
# 14 times (316µs+4.11ms) by Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:136] at line 119 of Moose/Meta/Method/Accessor/Native.pm, avg 316µs/call
# 14 times (351µs+2.62ms) by Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:106] at line 103 of Moose/Meta/Method/Accessor/Native.pm, avg 212µs/call | ||||
| 70 | 56 | 598µs | return unless $Moose::SUPER_BODY; | ||
| 71 | 28 | 6.74ms | $Moose::SUPER_BODY->(@Moose::SUPER_ARGS); # spent 4.11ms making 14 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 294µs/call
# spent 2.62ms making 14 calls to Moose::Meta::Method::Accessor::_inline_get, avg 187µs/call | ||
| 72 | } | ||||
| 73 | |||||
| 74 | # spent 3.39ms (261µs+3.13) within Moose::Role::override which was called 8 times, avg 423µs/call:
# 4 times (113µs+1.41ms) by Moose::Role::override at line 359 of Moose/Exporter.pm, avg 381µs/call
# once (44µs+484µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 106 of Moose/Meta/Method/Accessor/Native.pm
# once (40µs+475µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 154 of Moose/Meta/Method/Accessor/Native/Writer.pm
# once (32µs+384µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 114 of Moose/Meta/Method/Accessor/Native.pm
# once (31µs+374µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 136 of Moose/Meta/Method/Accessor/Native.pm | ||||
| 75 | 12 | 110µs | my $meta = shift; | ||
| 76 | my ( $name, $code ) = @_; | ||||
| 77 | 4 | 1.41ms | $meta->add_override_method_modifier( $name, $code ); # spent 1.41ms making 4 calls to Moose::Meta::Role::add_override_method_modifier, avg 352µs/call | ||
| 78 | } | ||||
| 79 | |||||
| 80 | sub inner { | ||||
| 81 | croak "Roles cannot support 'inner'"; | ||||
| 82 | } | ||||
| 83 | |||||
| 84 | sub augment { | ||||
| 85 | croak "Roles cannot support 'augment'"; | ||||
| 86 | } | ||||
| 87 | |||||
| 88 | 1 | 35µs | 1 | 5.13ms | Moose::Exporter->setup_import_methods( # spent 5.13ms making 1 call to Moose::Exporter::setup_import_methods |
| 89 | with_meta => [ | ||||
| 90 | qw( with requires excludes has before after around override ) | ||||
| 91 | ], | ||||
| 92 | as_is => [ | ||||
| 93 | qw( extends super inner augment ), | ||||
| 94 | \&Carp::confess, | ||||
| 95 | \&Scalar::Util::blessed, | ||||
| 96 | ], | ||||
| 97 | ); | ||||
| 98 | |||||
| 99 | # spent 416ms (13.9+402) within Moose::Role::init_meta which was called 83 times, avg 5.01ms/call:
# 81 times (13.4ms+381ms) 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 4.87ms/call
# 2 times (468µs+21.1ms) by MooseX::Role::Parameterized::init_meta at line 49 of MooseX/Role/Parameterized.pm, avg 10.8ms/call | ||||
| 100 | 1328 | 14.3ms | shift; | ||
| 101 | my %args = @_; | ||||
| 102 | |||||
| 103 | my $role = $args{for_class}; | ||||
| 104 | |||||
| 105 | unless ($role) { | ||||
| 106 | require Moose; | ||||
| 107 | Moose->throw_error("Cannot call init_meta without specifying a for_class"); | ||||
| 108 | } | ||||
| 109 | |||||
| 110 | my $metaclass = $args{metaclass} || "Moose::Meta::Role"; | ||||
| 111 | my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta'; | ||||
| 112 | |||||
| 113 | 83 | 908µs | Moose->throw_error("The Metaclass $metaclass must be a subclass of Moose::Meta::Role.") # spent 908µs making 83 calls to UNIVERSAL::isa, avg 11µs/call | ||
| 114 | unless $metaclass->isa('Moose::Meta::Role'); | ||||
| 115 | |||||
| 116 | # make a subtype for each Moose role | ||||
| 117 | 166 | 75.8ms | role_type $role unless find_type_constraint($role); # spent 67.8ms making 83 calls to Moose::Util::TypeConstraints::role_type, avg 817µs/call
# spent 7.96ms making 83 calls to Moose::Util::TypeConstraints::find_type_constraint, avg 96µs/call | ||
| 118 | |||||
| 119 | my $meta; | ||||
| 120 | 83 | 1.11ms | if ( $meta = Class::MOP::get_metaclass_by_name($role) ) { # spent 1.11ms making 83 calls to Class::MOP::get_metaclass_by_name, avg 13µs/call | ||
| 121 | unless ( $meta->isa("Moose::Meta::Role") ) { | ||||
| 122 | my $error_message = "$role already has a metaclass, but it does not inherit $metaclass ($meta)."; | ||||
| 123 | if ( $meta->isa('Moose::Meta::Class') ) { | ||||
| 124 | Moose->throw_error($error_message . ' You cannot make the same thing a role and a class. Remove either Moose or Moose::Role.'); | ||||
| 125 | } else { | ||||
| 126 | Moose->throw_error($error_message); | ||||
| 127 | } | ||||
| 128 | } | ||||
| 129 | } | ||||
| 130 | else { | ||||
| 131 | 83 | 71.6ms | $meta = $metaclass->initialize($role); # spent 71.6ms making 83 calls to Moose::Meta::Role::initialize, avg 862µs/call | ||
| 132 | } | ||||
| 133 | |||||
| 134 | if (defined $meta_name) { | ||||
| 135 | # also check for inherited non moose 'meta' method? | ||||
| 136 | 83 | 34.4ms | my $existing = $meta->get_method($meta_name); # spent 34.4ms making 83 calls to Class::MOP::Mixin::HasMethods::get_method, avg 414µs/call | ||
| 137 | if ($existing && !$existing->isa('Class::MOP::Method::Meta')) { | ||||
| 138 | Carp::cluck "Moose::Role is overwriting an existing method named " | ||||
| 139 | . "$meta_name in role $role with a method " | ||||
| 140 | . "which returns the class's metaclass. If this is " | ||||
| 141 | . "actually what you want, you should remove the " | ||||
| 142 | . "existing method, otherwise, you should rename or " | ||||
| 143 | . "disable this generated method using the " | ||||
| 144 | . "'-meta_name' option to 'use Moose::Role'."; | ||||
| 145 | } | ||||
| 146 | 83 | 219ms | $meta->_add_meta_method($meta_name); # spent 219ms making 83 calls to Class::MOP::Mixin::HasMethods::_add_meta_method, avg 2.63ms/call | ||
| 147 | } | ||||
| 148 | |||||
| 149 | return $meta; | ||||
| 150 | } | ||||
| 151 | |||||
| 152 | 1 | 30µs | 1; | ||
| 153 | |||||
| 154 | __END__ |