| Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/5.38.2/PerlIO.pm |
| Statements | Executed 2 statements in 3µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 4 | 1 | 1 | 7µs | 7µ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 | 400ns | our $VERSION = '1.12'; | ||
| 4 | |||||
| 5 | # Map layer name to package that defines it | ||||
| 6 | 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 =~ s{::}{/}gr . '.pm' }; | ||||
| 23 | warn $@ if $@; | ||||
| 24 | } | ||||
| 25 | } | ||||
| 26 | |||||
| 27 | sub F_UTF8 () { 0x8000 } | ||||
| 28 | |||||
| 29 | 1 | 3µs | 1; | ||
| 30 | __END__ | ||||
# spent 7µs within PerlIO::get_layers which was called 4 times, avg 2µs/call:
# 4 times (7µs+0s) by Test2::Util::clone_io at line 194 of Test2/Util.pm, avg 2µs/call |