| Filename | /usr/share/perl5/Import/Into.pm |
| Statements | Executed 0 statements in 0s |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 1 | 1 | 171µs | 203µs | Import::Into::_make_action |
| 2 | 1 | 1 | 37µs | 347µs | import::into |
| 2 | 1 | 1 | 28µs | 31µs | Import::Into::_prelude |
| 1 | 1 | 1 | 19µs | 28µs | Import::Into::BEGIN@3 |
| 1 | 1 | 1 | 13µs | 24µs | Import::Into::BEGIN@4 |
| 1 | 1 | 1 | 11µs | 16µs | Import::Into::BEGIN@5 |
| 2 | 1 | 1 | 3µs | 3µs | Import::Into::CORE:match (opcode) |
| 0 | 0 | 0 | 0s | 0s | unimport::out_of |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Import::Into; | ||||
| 2 | |||||
| 3 | 2 | 36µs | # spent 28µs (19+8) within Import::Into::BEGIN@3 which was called:
# once (19µs+8µs) by Moo::BEGIN@5 at line 3 # spent 28µs making 1 call to Import::Into::BEGIN@3
# spent 8µs making 1 call to strict::import | ||
| 4 | 2 | 34µs | # spent 24µs (13+10) within Import::Into::BEGIN@4 which was called:
# once (13µs+10µs) by Moo::BEGIN@5 at line 4 # spent 24µs making 1 call to Import::Into::BEGIN@4
# spent 10µs making 1 call to warnings::import | ||
| 5 | 2 | 21µs | # spent 16µs (11+5) within Import::Into::BEGIN@5 which was called:
# once (11µs+5µs) by Moo::BEGIN@5 at line 5 # spent 16µs making 1 call to Import::Into::BEGIN@5
# spent 5µs making 1 call to Module::Runtime::import | ||
| 6 | |||||
| 7 | our $VERSION = '1.002004'; | ||||
| 8 | |||||
| 9 | # spent 31µs (28+3) within Import::Into::_prelude which was called 2 times, avg 16µs/call:
# 2 times (28µs+3µs) by Import::Into::_make_action at line 29, avg 16µs/call | ||||
| 10 | my $target = shift; | ||||
| 11 | my ($package, $file, $line, $level) | ||||
| 12 | 2 | 3µs | = ref $target ? @{$target}{qw(package filename line)} # spent 3µs making 2 calls to Import::Into::CORE:match, avg 2µs/call | ||
| 13 | : $target =~ /[^0-9]/ ? ($target) | ||||
| 14 | : (undef, undef, undef, $target); | ||||
| 15 | if (defined $level) { | ||||
| 16 | my ($p, $fn, $ln) = caller($level + 2); | ||||
| 17 | $package ||= $p; | ||||
| 18 | $file ||= $fn; | ||||
| 19 | $line ||= $ln; | ||||
| 20 | } | ||||
| 21 | qq{package $package;\n} | ||||
| 22 | . ($file ? "#line $line \"$file\"\n" : '') | ||||
| 23 | } | ||||
| 24 | |||||
| 25 | # spent 203µs (171+31) within Import::Into::_make_action which was called 2 times, avg 101µs/call:
# 2 times (171µs+31µs) by import::into at line 36, avg 101µs/call | ||||
| 26 | my ($action, $target) = @_; | ||||
| 27 | my $version = ref $target && $target->{version}; | ||||
| 28 | my $ver_check = $version ? ', $version' : ''; | ||||
| 29 | 2 | 31µs | eval _prelude($target) # spent 31µs making 2 calls to Import::Into::_prelude, avg 16µs/call | ||
| 30 | . qq{sub { Module::Runtime::use_module( shift$ver_check )->$action(\@_) }} | ||||
| 31 | or die "Failed to build action sub to ${action} for ${target}: $@"; | ||||
| 32 | } | ||||
| 33 | |||||
| 34 | # spent 347µs (37+310) within import::into which was called 2 times, avg 173µs/call:
# 2 times (37µs+310µs) by Moo::import at line 24 of Moo.pm, avg 173µs/call | ||||
| 35 | my ($class, $target, @args) = @_; | ||||
| 36 | 4 | 310µs | _make_action(import => $target)->($class, @args); # spent 203µs making 2 calls to Import::Into::_make_action, avg 101µs/call
# spent 55µs making 1 call to Method::Generate::Constructor::__ANON__[Method/Generate/Constructor.pm:202]
# spent 52µs making 1 call to DBIx::Class::Storage::BlockRunner::__ANON__[DBIx/Class/Storage/BlockRunner.pm:29] | ||
| 37 | } | ||||
| 38 | |||||
| 39 | sub unimport::out_of { | ||||
| 40 | my ($class, $target, @args) = @_; | ||||
| 41 | _make_action(unimport => $target)->($class, @args); | ||||
| 42 | } | ||||
| 43 | |||||
| 44 | 1; | ||||
| 45 | |||||
| 46 | __END__ | ||||
# spent 3µs within Import::Into::CORE:match which was called 2 times, avg 2µs/call:
# 2 times (3µs+0s) by Import::Into::_prelude at line 12, avg 2µs/call |