| 1 | package PerlIO; | ||||||||||
| 2 | |||||||||||
| 3 | 7 | our $VERSION = '1.12'; | |||||||||
| 4 | |||||||||||
| 5 | # Map layer name to package that defines it | ||||||||||
| 6 | 7 | our %alias; | |||||||||
| 7 | |||||||||||
| 8 | sub import | ||||||||||
| 9 | 7 | ▶ | { | ||||||||
|
Subroutine
import: called CC=4 SCAR=14.2
| |||||||||||
| 10 | 7 | my $class = shift; | |||||||||
| 11 | 7 | ▶ | while (@_) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | { | ||||||||||
| 13 | 7 | my $layer = shift; | |||||||||
| 14 | 7 | ▶ | if (exists $alias{$layer}) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | { | ||||||||||
| 16 | 0 | $layer = $alias{$layer} | |||||||||
| 17 | } | ||||||||||
| 18 | else | ||||||||||
| 19 | { | ||||||||||
| 20 | 7 | $layer = "${class}::$layer"; | |||||||||
| 21 | } | ||||||||||
| 22 | 7 | eval { require $layer =~ s{::}{/}gr . '.pm' }; | |||||||||
| 23 | 7 | ▶ | warn $@ if $@; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | } | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | sub F_UTF8 () { 0x8000 } | ||||||||||
| 28 | |||||||||||
| 29 | 7 | 1; | |||||||||
| 30 | __END__ | ||||||||||