develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH 20010704.007] Re: bareword not detected as part of first argument to print

Thread Previous | Thread Next
From:
Abhijit Menon-Sen
Date:
July 18, 2001 17:22
Subject:
[PATCH 20010704.007] Re: bareword not detected as part of first argument to print
Message ID:
20010719055156.B10327@lustre.dyn.wiw.org
At 2001-07-05 07:28:21, Philip.Newton@gmx.net wrote:
>
> This does not give an error when I think it should:
> 
>     #!/usr/bin/perl -w
>     use strict;
>     print(BAREWORD . "\n");

This is band-aid at best, but it fixes the problem.

- ams

--- current/toke.c~	Thu Jul 19 05:39:00 2001
+++ current/toke.c	Thu Jul 19 05:40:14 2001
@@ -3892,7 +3892,7 @@
 		    if ( !immediate_paren && (PL_last_lop_op == OP_SORT ||
                          ((!gv || !GvCVu(gv)) &&
                         (PL_last_lop_op != OP_MAPSTART &&
-			 PL_last_lop_op != OP_GREPSTART))))
+			 PL_last_lop_op != OP_GREPSTART))) && *s != '.')
 		    {
 			PL_expect = (PL_last_lop == PL_oldoldbufptr) ? XTERM : XOPERATOR;
 			goto bareword;

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About