Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/PerlIO.pm |
Statements | Executed 10 statements in 96µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 305µs | 11.4ms | import | PerlIO::
2 | 1 | 1 | 10µs | 10µs | get_layers (xsub) | PerlIO::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package PerlIO; | ||||
2 | |||||
3 | 1 | 3µs | our $VERSION = '1.06'; | ||
4 | |||||
5 | # Map layer name to package that defines it | ||||
6 | 1 | 2µs | our %alias; | ||
7 | |||||
8 | sub import | ||||
9 | # spent 11.4ms (305µs+11.1) within PerlIO::import which was called:
# once (305µs+11.1ms) by open::BEGIN@88 at line 88 of open.pm | ||||
10 | 2 | 10µs | my $class = shift; | ||
11 | while (@_) | ||||
12 | { | ||||
13 | 4 | 66µs | my $layer = shift; | ||
14 | 1 | 5µs | if (exists $alias{$layer}) | ||
15 | { | ||||
16 | $layer = $alias{$layer} | ||||
17 | } | ||||
18 | else | ||||
19 | { | ||||
20 | $layer = "${class}::$layer"; | ||||
21 | } | ||||
22 | eval "require $layer"; # spent 113µs executing statements in string eval | ||||
23 | warn $@ if $@; | ||||
24 | } | ||||
25 | } | ||||
26 | |||||
27 | sub F_UTF8 () { 0x8000 } | ||||
28 | |||||
29 | 1 | 10µs | 1; | ||
30 | __END__ | ||||
# spent 10µs within PerlIO::get_layers which was called 2 times, avg 5µs/call:
# 2 times (10µs+0s) by open::_drop_oldenc at line 37 of open.pm, avg 5µs/call |