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:
Nick Ing-Simmons
Date:
July 19, 2001 00:49
Subject:
[PATCH 20010704.007] Re: bareword not detected as part of first argument to print
Message ID:
20010719074933.751.3@bactrian.ni-s.u-net.com
Abhijit Menon-Sen <ams@wiw.org> writes:
>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.

Not applied (yet).

Can you explain why the '.' case is to be singled out 
for special band-aid ?


>
>- 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;
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


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