Filename | /usr/share/perl/5.10/subs.pm |
Statements | Executed 33 statements in 163µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3 | 3 | 3 | 99µs | 99µs | import | subs::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package subs; | ||||
2 | |||||
3 | 1 | 900ns | our $VERSION = '1.00'; | ||
4 | |||||
5 | =head1 NAME | ||||
6 | |||||
- - | |||||
29 | 1 | 50µs | require 5.000; | ||
30 | |||||
31 | # spent 99µs within subs::import which was called 3 times, avg 33µs/call:
# once (45µs+0s) by Business::ISBN::BEGIN@61 at line 61 of Business/ISBN.pm
# once (27µs+0s) by Business::ISBN10::BEGIN@9 at line 9 of Business/ISBN10.pm
# once (26µs+0s) by Business::ISBN13::BEGIN@10 at line 10 of Business/ISBN13.pm | ||||
32 | 30 | 108µs | my $callpack = caller; | ||
33 | my $pack = shift; | ||||
34 | my @imports = @_; | ||||
35 | foreach $sym (@imports) { | ||||
36 | *{"${callpack}::$sym"} = \&{"${callpack}::$sym"}; | ||||
37 | } | ||||
38 | }; | ||||
39 | |||||
40 | 1 | 4µs | 1; |