summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-08 10:21:42 +0200
committerNicholas Clark <nick@ccl4.org>2009-10-08 14:35:40 +0200
commitf3ce0eb798df5e942a77ee79720ffb21932d29f4 (patch)
tree7f002738eb0285d1633aed56f428c487f83155e2 /t
parentf3ca7babe1885e6681f31690f657a7eada6dbb41 (diff)
downloadperl-f3ce0eb798df5e942a77ee79720ffb21932d29f4.tar.gz
Avoid using pragmata in opsubs.t - use may not work yet.
Diffstat (limited to 't')
-rw-r--r--t/comp/opsubs.t17
1 files changed, 6 insertions, 11 deletions
diff --git a/t/comp/opsubs.t b/t/comp/opsubs.t
index a9b7ca8577..69d804913e 100644
--- a/t/comp/opsubs.t
+++ b/t/comp/opsubs.t
@@ -1,20 +1,15 @@
-#!./perl -T
+#!./perl -Tw
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
+# Uncomment this for testing, but don't leave it in for "production", as
+# we've not yet verified that use works.
+# use strict;
-use warnings;
-use strict;
$|++;
require "./test.pl";
plan(tests => 36);
-use vars qw($TODO);
-
=pod
Even if you have a C<sub q{}>, calling C<q()> will be parsed as the
@@ -36,7 +31,7 @@ sub y { return "y-".shift }
# m operator
can_ok( 'main', "m" );
SILENCE_WARNING: { # Complains because $_ is undef
- no warnings;
+ local $^W;
isnt( m('unqualified'), "m-unqualified", "m('unqualified') is oper" );
}
is( main::m('main'), "m-main", "main::m() is func" );
@@ -73,7 +68,7 @@ eval "qx('unqualified'".
SKIP: {
skip("external command not portable on VMS", 1) if $^O eq 'VMS';
TODO: {
- local $TODO = $^O eq 'MSWin32' ? "Tainting of PATH not working of Windows" : $TODO;
+ local $::TODO = $^O eq 'MSWin32' ? "Tainting of PATH not working of Windows" : $::TODO;
like( $@, qr/^Insecure/, "qx('unqualified') doesn't work" );
}
}