Skip to content
Browse files

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}.
  • Loading branch information...
1 parent d36b6fc commit 6bb18b54070eef37fdc718ad193cd88a1569f0cd Nicholas Clark committed Jun 20, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 TestInit.pm
View
5 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;

0 comments on commit 6bb18b5

Please sign in to comment.
Something went wrong with that request. Please try again.