| 1 | package POE::Resources; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 203 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 203 | ▶ | use vars qw($VERSION); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 203 | $VERSION = '1.370'; # NOTE - Should be #.### (three decimal places) | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 203 | my @resources = qw( | |||||||||||||||||||||||||||
| 9 | POE::XS::Resource::Aliases | ||||||||||||||||||||||||||||
| 10 | POE::XS::Resource::Events | ||||||||||||||||||||||||||||
| 11 | POE::XS::Resource::Extrefs | ||||||||||||||||||||||||||||
| 12 | POE::XS::Resource::FileHandles | ||||||||||||||||||||||||||||
| 13 | POE::XS::Resource::SIDs | ||||||||||||||||||||||||||||
| 14 | POE::XS::Resource::Sessions | ||||||||||||||||||||||||||||
| 15 | POE::XS::Resource::Signals | ||||||||||||||||||||||||||||
| 16 | ); | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 202 | ▶ | sub load { | ||||||||||||||||||||||||||
|
Subroutine
load: called CC=5 SCAR=16.2
Pod
documented
| |||||||||||||||||||||||||||||
| 19 | 202 | my $package = (caller())[0]; | |||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 202 | foreach my $resource (@resources) { | |||||||||||||||||||||||||||
| 22 | 0 | ▶ | eval "package $package; use $resource"; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
BEGIN: called CC=1 SCAR=0.1
| |||||||||||||||||||||||||||||
| 23 | 2812 | ▶ | if ($@) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 24 | # Retry the resource, removing XS:: if it couldn't be loaded. | ||||||||||||||||||||||||||||
| 25 | # If there's no XS:: to be removed, fall through and die. | ||||||||||||||||||||||||||||
| 26 | 1406 | ▶ | redo if $@ =~ /Can't locate.*?in \@INC/ and $resource =~ s/::XS::/::/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$@ =~ /Can't locate.*?in \@INC/ and $resource =~ s/::XS::/::/
MC/DC100%2/2
$@ =~ /Can't locate.*?in \@INC/ and $resource =~ s/::XS::/::/
$@ =~ /Can't locate.*?in \@INC/
$resource =~ s/::XS::/::/
Truth table100%3/3
A and B
A= $@ =~ /Can't locate.*?in \@INC/B= $resource =~ s/::XS::/::/
| |||||||||||||||||||||||||||||
| 27 | 2 | die; | |||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 203 | 1; | |||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | __END__ | ||||||||||||||||||||||||||||