Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2/PerlIO.pm |
Statements | Executed 10 statements in 29µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 183µs | 524µs | import | PerlIO::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package PerlIO; | ||||
2 | |||||
3 | 1 | 500ns | our $VERSION = '1.07'; | ||
4 | |||||
5 | # Map layer name to package that defines it | ||||
6 | 1 | 200ns | our %alias; | ||
7 | |||||
8 | sub import | ||||
9 | # spent 524µs (183+341) within PerlIO::import which was called:
# once (183µs+341µs) by Path::Tiny::BEGIN@816 at line 816 of Path/Tiny.pm | ||||
10 | 1 | 400ns | my $class = shift; | ||
11 | 1 | 4µs | while (@_) | ||
12 | { | ||||
13 | 1 | 200ns | my $layer = shift; | ||
14 | 1 | 300ns | if (exists $alias{$layer}) | ||
15 | { | ||||
16 | $layer = $alias{$layer} | ||||
17 | } | ||||
18 | else | ||||
19 | { | ||||
20 | 1 | 1µs | $layer = "${class}::$layer"; | ||
21 | } | ||||
22 | 1 | 19µs | eval "require $layer"; # spent 58µs executing statements in string eval | ||
23 | 1 | 600ns | warn $@ if $@; | ||
24 | } | ||||
25 | } | ||||
26 | |||||
27 | sub F_UTF8 () { 0x8000 } | ||||
28 | |||||
29 | 1 | 3µs | 1; | ||
30 | __END__ |