From: Nicholas Clark Date: Thu, 8 Oct 2009 08:21:42 +0000 (+0200) Subject: Avoid using pragmata in opsubs.t - use may not work yet. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3ce0eb798df5e942a77ee79720ffb21932d29f4;p=p5sagit%2Fp5-mst-13.2.git Avoid using pragmata in opsubs.t - use may not work yet. --- diff --git a/t/comp/opsubs.t b/t/comp/opsubs.t index a9b7ca8..69d8049 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, calling C 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" ); } }