| Filename | /usr/share/perl/5.10/parent.pm |
| Statements | Executed 38 statements in 484µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 3 | 3 | 3 | 767µs | 1.35ms | parent::import (recurses: max depth 1, inclusive time 64µs) |
| 3 | 1 | 1 | 18µs | 18µs | parent::CORE:subst (opcode) |
| 1 | 1 | 1 | 16µs | 20µs | parent::BEGIN@2 |
| 1 | 1 | 1 | 10µs | 27µs | parent::BEGIN@25 |
| 1 | 1 | 1 | 9µs | 34µs | parent::BEGIN@3 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package parent; | ||||
| 2 | 3 | 34µs | 2 | 23µs | # spent 20µs (16+3) within parent::BEGIN@2 which was called:
# once (16µs+3µs) by DateTime::TimeZone::Floating::BEGIN@10 at line 2 # spent 20µs making 1 call to parent::BEGIN@2
# spent 4µs making 1 call to strict::import |
| 3 | 3 | 169µs | 2 | 59µs | # spent 34µs (9+25) within parent::BEGIN@3 which was called:
# once (9µs+25µs) by DateTime::TimeZone::Floating::BEGIN@10 at line 3 # spent 34µs making 1 call to parent::BEGIN@3
# spent 25µs making 1 call to vars::import |
| 4 | 1 | 700ns | $VERSION = '0.221'; | ||
| 5 | |||||
| 6 | # spent 1.35ms (767µs+587µs) within parent::import which was called 3 times, avg 451µs/call:
# once (712µs+642µs) by DateTime::TimeZone::Floating::BEGIN@10 at line 10 of DateTime/TimeZone/Floating.pm
# once (25µs+-25µs) by DateTime::TimeZone::UTC::BEGIN@10 at line 10 of DateTime/TimeZone/UTC.pm
# once (30µs+-30µs) by DateTime::TimeZone::OffsetOnly::BEGIN@10 at line 10 of DateTime/TimeZone/OffsetOnly.pm | ||||
| 7 | 12 | 25µs | my $class = shift; | ||
| 8 | |||||
| 9 | my $inheritor = caller(0); | ||||
| 10 | |||||
| 11 | 3 | 7µs | if ( @_ and $_[0] eq '-norequire' ) { | ||
| 12 | shift @_; | ||||
| 13 | } else { | ||||
| 14 | for ( my @filename = @_ ) { | ||||
| 15 | 9 | 124µs | if ( $_ eq $inheritor ) { | ||
| 16 | warn "Class '$inheritor' tried to inherit from itself\n"; | ||||
| 17 | }; | ||||
| 18 | |||||
| 19 | 3 | 18µs | s{::|'}{/}g; # spent 18µs making 3 calls to parent::CORE:subst, avg 6µs/call | ||
| 20 | require "$_.pm"; # dies if the file is not found | ||||
| 21 | } | ||||
| 22 | } | ||||
| 23 | |||||
| 24 | { | ||||
| 25 | 3 | 78µs | 2 | 44µs | # spent 27µs (10+17) within parent::BEGIN@25 which was called:
# once (10µs+17µs) by DateTime::TimeZone::Floating::BEGIN@10 at line 25 # spent 27µs making 1 call to parent::BEGIN@25
# spent 17µs making 1 call to strict::unimport |
| 26 | # This is more efficient than push for the new MRO | ||||
| 27 | # at least until the new MRO is fixed | ||||
| 28 | 3 | 43µs | @{"$inheritor\::ISA"} = (@{"$inheritor\::ISA"} , @_); | ||
| 29 | }; | ||||
| 30 | }; | ||||
| 31 | |||||
| 32 | 1 | 3µs | "All your base are belong to us" | ||
| 33 | |||||
| 34 | __END__ | ||||
# spent 18µs within parent::CORE:subst which was called 3 times, avg 6µs/call:
# 3 times (18µs+0s) by parent::import at line 19, avg 6µs/call |