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