Filename | /usr/share/perl5/Import/Into.pm |
Statements | Executed 36 statements in 599µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 1 | 1 | 157µs | 193µs | _make_action | Import::Into::
2 | 1 | 1 | 33µs | 36µs | _prelude | Import::Into::
2 | 1 | 1 | 18µs | 307µs | into | import::
1 | 1 | 1 | 15µs | 22µs | BEGIN@3 | Import::Into::
1 | 1 | 1 | 12µs | 16µs | BEGIN@5 | Import::Into::
1 | 1 | 1 | 9µs | 18µs | BEGIN@4 | Import::Into::
2 | 1 | 1 | 2µs | 2µs | CORE:match (opcode) | Import::Into::
0 | 0 | 0 | 0s | 0s | out_of | unimport::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Import::Into; | ||||
2 | |||||
3 | 2 | 40µs | 2 | 29µs | # spent 22µs (15+7) within Import::Into::BEGIN@3 which was called:
# once (15µs+7µs) by Moo::BEGIN@5 at line 3 # spent 22µs making 1 call to Import::Into::BEGIN@3
# spent 7µs making 1 call to strict::import |
4 | 2 | 36µs | 2 | 27µs | # spent 18µs (9+9) within Import::Into::BEGIN@4 which was called:
# once (9µs+9µs) by Moo::BEGIN@5 at line 4 # spent 18µs making 1 call to Import::Into::BEGIN@4
# spent 9µs making 1 call to warnings::import |
5 | 2 | 320µs | 2 | 21µs | # spent 16µs (12+5) within Import::Into::BEGIN@5 which was called:
# once (12µ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 | 1 | 500ns | our $VERSION = '1.002004'; | ||
8 | |||||
9 | # spent 36µs (33+2) within Import::Into::_prelude which was called 2 times, avg 18µs/call:
# 2 times (33µs+2µs) by Import::Into::_make_action at line 29, avg 18µs/call | ||||
10 | 2 | 900ns | my $target = shift; | ||
11 | my ($package, $file, $line, $level) | ||||
12 | 2 | 19µs | 2 | 2µs | = ref $target ? @{$target}{qw(package filename line)} # spent 2µs making 2 calls to Import::Into::CORE:match, avg 1µs/call |
13 | : $target =~ /[^0-9]/ ? ($target) | ||||
14 | : (undef, undef, undef, $target); | ||||
15 | 2 | 800ns | if (defined $level) { | ||
16 | 2 | 7µs | my ($p, $fn, $ln) = caller($level + 2); | ||
17 | 2 | 600ns | $package ||= $p; | ||
18 | 2 | 300ns | $file ||= $fn; | ||
19 | 2 | 900ns | $line ||= $ln; | ||
20 | } | ||||
21 | qq{package $package;\n} | ||||
22 | 2 | 10µs | . ($file ? "#line $line \"$file\"\n" : '') | ||
23 | } | ||||
24 | |||||
25 | # spent 193µs (157+36) within Import::Into::_make_action which was called 2 times, avg 97µs/call:
# 2 times (157µs+36µs) by import::into at line 36, avg 97µs/call | ||||
26 | 2 | 700ns | my ($action, $target) = @_; | ||
27 | 2 | 1µs | my $version = ref $target && $target->{version}; | ||
28 | 2 | 600ns | my $ver_check = $version ? ', $version' : ''; | ||
29 | 2 | 147µs | 2 | 36µs | eval _prelude($target) # spent 36µs making 2 calls to Import::Into::_prelude, avg 18µ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 307µs (18+289) within import::into which was called 2 times, avg 153µs/call:
# 2 times (18µs+289µs) by Moo::import at line 24 of Moo.pm, avg 153µs/call | ||||
35 | 2 | 2µs | my ($class, $target, @args) = @_; | ||
36 | 2 | 10µs | 4 | 289µs | _make_action(import => $target)->($class, @args); # spent 193µs making 2 calls to Import::Into::_make_action, avg 97µs/call
# spent 51µs making 1 call to Method::Generate::Constructor::__ANON__[Method/Generate/Constructor.pm:202]
# spent 45µ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 | 2µs | 1; | ||
45 | |||||
46 | __END__ | ||||
# spent 2µs within Import::Into::CORE:match which was called 2 times, avg 1µs/call:
# 2 times (2µs+0s) by Import::Into::_prelude at line 12, avg 1µs/call |