In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/7e1dab6a61131a77ad847a43dacb66e48b0ab716?hp=9b9f19dadd2a59689b19ce551651f10aa8d97c32>

- Log -----------------------------------------------------------------
commit 7e1dab6a61131a77ad847a43dacb66e48b0ab716
Author: Nicholas Clark <[email protected]>
Date:   Sat Dec 3 11:59:05 2011 +0000

    Tidy up t/re/regexp.t
    
    Eliminate the declaration of $numtests, unused since commit 
1a6108908b085da4.
    Convert $iters and $OP to lexicals. Remove the vestigial logic for finding
    t/re/re_tests - the MacOS classic style pathname is redundant now, and the
    file can never be found at t/re/re_tests given that there is a chdir 't' in
    the BEGIN block.
-----------------------------------------------------------------------

Summary of changes:
 t/re/regexp.t |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/t/re/regexp.t b/t/re/regexp.t
index 3e5c6f8..c54c5a3 100644
--- a/t/re/regexp.t
+++ b/t/re/regexp.t
@@ -44,7 +44,7 @@
 # Note that columns 2,3 and 5 are all enclosed in double quotes and then
 # evalled; so something like a\"\x{100}$1 has length 3+length($1).
 
-my $file;
+my ($file, $iters);
 BEGIN {
     $iters = shift || 1;       # Poor man performance suite, 10000 is OK.
 
@@ -66,13 +66,12 @@ sub _comment {
 
 use strict;
 use warnings FATAL=>"all";
-use vars qw($iters $numtests $bang $ffff $nulnul $OP);
+use vars qw($bang $ffff $nulnul); # used by the tests
 use vars qw($qr $skip_amp $qr_embed $qr_embed_thr); # set by our callers
 
 
 if (!defined $file) {
-    open(TESTS,'re/re_tests') || open(TESTS,'t/re/re_tests')
-       || open(TESTS,':re:re_tests') || die "Can't open re_tests";
+    open TESTS, 're/re_tests' or die "Can't open re/re_tests: $!";
 }
 
 my @tests = <TESTS>;
@@ -82,7 +81,7 @@ close TESTS;
 $bang = sprintf "\\%03o", ord "!"; # \41 would not be portable.
 $ffff  = chr(0xff) x 2;
 $nulnul = "\0" x 2;
-$OP = $qr ? 'qr' : 'm';
+my $OP = $qr ? 'qr' : 'm';
 
 $| = 1;
 printf "1..%d\n# $iters iterations\n", scalar @tests;

--
Perl5 Master Repository

Reply via email to