This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate the unused global override $WarnPattern from ReTest.pl
authorNicholas Clark <nick@ccl4.org>
Thu, 3 Mar 2011 11:57:29 +0000 (11:57 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 3 Mar 2011 11:57:29 +0000 (11:57 +0000)
t/re/ReTest.pl

index be556d6..0c08e25 100644 (file)
@@ -11,7 +11,6 @@ use vars qw(
     $EXPECTED_TESTS 
     $TODO
     $Message
-    $WarnPattern
     $BugId
     $running_as_thread
     $IS_ASCII
@@ -166,7 +165,7 @@ sub must_die {
 
 sub must_warn {
     my ($code, $pattern, $name) = @_;
-    $pattern //= $WarnPattern;
+    Carp::confess("Bad pattern") unless $pattern;
     my $w;
     local $SIG {__WARN__} = sub {$w .= join "" => @_};
     use warnings 'all';