summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-13 15:20:07 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-13 15:20:07 +0000
commitcb07477ea9af3a143e6227a4db7952cd7b78dd76 (patch)
tree6a638f22e678efa08a3ba99f5766797ceecfaf39 /t
parentead3e2795abc84cb11c00e977613ee250337ac2f (diff)
downloadperl-cb07477ea9af3a143e6227a4db7952cd7b78dd76.tar.gz
In overload.t, move require './test.pl' into BEGIN to avoid stubbing subs.
Also move the use of strict and warnings after the BEGIN block, so that they can take advantage of the @INC setting it performs. Swap to done_testing().
Diffstat (limited to 't')
-rw-r--r--t/re/overload.t17
1 files changed, 5 insertions, 12 deletions
diff --git a/t/re/overload.t b/t/re/overload.t
index f89069bb9e..4e99bd3ec6 100644
--- a/t/re/overload.t
+++ b/t/re/overload.t
@@ -1,19 +1,13 @@
-#!./perl
-
-use strict;
-use warnings;
-no warnings 'syntax';
+#!./perl -w
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
+ require './test.pl';
}
-sub is;
-sub plan;
-
-require './test.pl';
-plan tests => 3;
+use strict;
+no warnings 'syntax';
{
# Bug #77084 points out a corruption problem when scalar //g is used
@@ -39,5 +33,4 @@ plan tests => 3;
is $1, $TAG, "void context //g against overloaded object";
}
-
-__END__
+done_testing();