In perl.git, the branch maint-5.10 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/384dc2341d61661c6296a03c8fcee78bf53c3277?hp=97df84f5811e7c90ff7368de89dfd99104a684c7>

- Log -----------------------------------------------------------------
commit 384dc2341d61661c6296a03c8fcee78bf53c3277
Author: David Mitchell <[email protected]>
Date:   Tue Aug 11 22:28:00 2009 +0100

    Revert "Re: [PATCH: TODO Tests] Re: [perl #53806] No complain about 
bareword"
    
    This reverts commit ace56ae50476eeb045e2f78e4b9550922f258fde.
    
    (follow-on from 984f9f6647)

M       lib/strict.t
M       t/lib/strict/subs

commit 749f7a534854ed11754686d0d50829841e637c1b
Author: David Mitchell <[email protected]>
Date:   Tue Aug 11 22:27:21 2009 +0100

    Revert "The TODO tests of change 33876 were actually fixed by change 33874."
    
    This reverts commit 9453289ade80637b5f30952e561a6060b8ec854f.
    
    (follow-on from be5c7c66a6)

M       t/lib/strict/subs

commit be5c7c66a6cc5679f20a066c3c88acc64bda5a3c
Author: David Mitchell <[email protected]>
Date:   Tue Aug 11 22:19:52 2009 +0100

    Revert "Re: [PATCH: TODO Tests] Re: [perl #53806] No complain about 
bareword"
    
    This reverts commit 984f9f66477bc722578262ae8520584e44e881af.
    
    This fix broke readline(BAREHANDLE)
    (Message-ID: <[email protected]>)

M       toke.c
-----------------------------------------------------------------------

Summary of changes:
 lib/strict.t      |   11 ++++-------
 t/lib/strict/subs |   15 ---------------
 toke.c            |    2 +-
 3 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/lib/strict.t b/lib/strict.t
index bfe6b63..f62b58d 100644
--- a/lib/strict.t
+++ b/lib/strict.t
@@ -83,20 +83,17 @@ for (@prgs){
     $expected =~ s|(\./)?abc\.pm|:abc.pm|g if $^O eq 'MacOS';
     $expected =~ s|./abc|:abc|g if $^O eq 'MacOS';
     my $prefix = ($results =~ s/^PREFIX\n//) ;
-    my $TODO = $prog =~ m/^#\s*TODO:/;
     if ( $results =~ s/^SKIPPED\n//) {
        print "$results\n" ;
     }
     elsif (($prefix and $results !~ /^\Q$expected/) or
           (!$prefix and $results ne $expected)){
-        if (! $TODO) {
-            print STDERR "PROG: $switch\n$prog\n";
-            print STDERR "EXPECTED:\n$expected\n";
-            print STDERR "GOT:\n$results\n";
-        }
+        print STDERR "PROG: $switch\n$prog\n";
+        print STDERR "EXPECTED:\n$expected\n";
+        print STDERR "GOT:\n$results\n";
         print "not ";
     }
-    print "ok " . ++$i . ($TODO ? " # TODO" : "") . "\n";
+    print "ok " . ++$i . "\n";
     foreach (@temps) 
        { unlink $_ if $_ } 
 }
diff --git a/t/lib/strict/subs b/t/lib/strict/subs
index c18af68..20a8afa 100644
--- a/t/lib/strict/subs
+++ b/t/lib/strict/subs
@@ -393,18 +393,3 @@ my @a;my $x=$a[FOO];
 EXPECT
 Bareword "FOO" not allowed while "strict subs" in use at - line 2.
 Execution of - aborted due to compilation errors.
-########
-# [perl #53806] No complain about bareword
-use strict 'subs';
-print FOO . "\n";
-EXPECT
-Bareword "FOO" not allowed while "strict subs" in use at - line 3.
-Execution of - aborted due to compilation errors.
-########
-# [perl #53806] No complain about bareword
-use strict 'subs';
-$ENV{PATH} = "";
-system(FOO . "\n");
-EXPECT
-Bareword "FOO" not allowed while "strict subs" in use at - line 4.
-Execution of - aborted due to compilation errors.
diff --git a/toke.c b/toke.c
index 933fcb3..662ea6e 100644
--- a/toke.c
+++ b/toke.c
@@ -5697,10 +5697,10 @@ Perl_yylex(pTHX)
 
                /* Call it a bare word */
 
-               bareword:
                if (PL_hints & HINT_STRICT_SUBS)
                    pl_yylval.opval->op_private |= OPpCONST_STRICT;
                else {
+               bareword:
                    if (lastchar != '-') {
                        if (ckWARN(WARN_RESERVED)) {
                            d = PL_tokenbuf;

--
Perl5 Master Repository

Reply via email to