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