summaryrefslogtreecommitdiff
path: root/TestInit.pm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-06-20 11:09:34 +0200
committerNicholas Clark <nick@ccl4.org>2011-06-22 22:41:24 +0200
commit6bb18b54070eef37fdc718ad193cd88a1569f0cd (patch)
treedbfccec262720457ef156d5c1d06c3ee439c5cdb /TestInit.pm
parentd36b6fc6667cdfc395b53f3d12285777c93dc6a0 (diff)
downloadperl-6bb18b54070eef37fdc718ad193cd88a1569f0cd.tar.gz
Two small tidying refactors for TestInit.pm
Make the order of backslash and forward slash in character classes consistent. Move the top level modification of $0 adjacent to the top level modification of $ENV{PERL_CORE}.
Diffstat (limited to 'TestInit.pm')
-rw-r--r--TestInit.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/TestInit.pm b/TestInit.pm
index 814c99c399..16eb318cc3 100644
--- a/TestInit.pm
+++ b/TestInit.pm
@@ -27,6 +27,8 @@ $VERSION = 1.04;
# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-07/msg00154.html
$ENV{PERL_CORE} = $^X;
+$0 =~ s/\.dp$//; # for the test.deparse make target
+
sub import {
my $self = shift;
my @up_2_t = ('../../lib', '../../t');
@@ -65,7 +67,7 @@ sub import {
$chdir = $1;
@INC = @up_2_t;
$setopt = 1;
- $^X =~ s!^\.([/\\])!..$1..$1!;
+ $^X =~ s!^\.([\\/])!..$1..$1!;
} else {
$chdir = 't';
@INC = '../lib';
@@ -110,5 +112,4 @@ sub import {
push @INC, '.' unless ${^TAINT};
}
-$0 =~ s/\.dp$//; # for the test.deparse make target
1;