| 1 | package ExtUtils::testlib; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | our $VERSION = '7.78'; | |
| 7 | 2 | $VERSION =~ tr/_//d; | |
| 8 | |||
| 9 | 2 | ▶ | use Cwd; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 2 | ▶ | use File::Spec; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | # So the tests can chdir around and not break @INC. | ||
| 13 | # We use getcwd() because otherwise rel2abs will blow up under taint | ||
| 14 | # mode pre-5.8. We detaint is so @INC won't be tainted. This is | ||
| 15 | # no worse, and probably better, than just shoving an untainted, | ||
| 16 | # relative "blib/lib" onto @INC. | ||
| 17 | 2 | my $cwd; | |
| 18 | 2 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 2 | ($cwd) = getcwd() =~ /(.*)/; | |
| 20 | } | ||
| 21 | 2 | ▶ | use lib map { File::Spec->rel2abs($_, $cwd) } qw(blib/arch blib/lib); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 2 | 1; | |
| 23 | __END__ | ||