develooper Front page | perl.perl5.porters | Postings from October 2016

[perl #6870] Odd parsing of "do ... for ..."

From:
Dan Collins via RT
Date:
October 21, 2016 16:40
Subject:
[perl #6870] Odd parsing of "do ... for ..."
Message ID:
rt-4.0.24-22479-1477068013-1603.6870-14-0@perl.org
On Mon Jul 04 14:52:53 2016, sprout wrote:
> On Mon Jul 04 08:57:43 2016, sprout wrote:
> > On Mon Jul 04 08:38:28 2016, dcollinsn@gmail.com wrote:
> > > In all versions 5.22.0 through blead, these testcases all produce no
> > > output. Is this the expected behavior? If so, I shall add a
> > > regression
> > > test.
> > 
> > That is the expected behaviour.  I think I may have fixed this, in
> > which case we may already have tests.
> 
> A bisect gives me:
> 
> c2900bb8185ddf2411dcf67573ec1c2e991d6dba is the first bad commit
> commit c2900bb8185ddf2411dcf67573ec1c2e991d6dba
> Author: Father Chrysostomos <sprout@cpan.org>
> Date:   Mon Jul 2 18:11:23 2012 -0700
> 
>     do-file should not force a bareword
>     
>     A word following do is forced to be a bareword for do-sub’s sake.  But
>     if it is going to be interpreted as do-file after all, that does not
>     make sense.  ‘do subname;’ should call the sub and run the file whose
>     name it returns, instead of running the file named ‘subname’.
> 
> so no, it is not tested.
> 
> I have no idea how that commit fixed it.
> 

Tests added in 9c2603366, closing.

-- 
Respectfully,
Dan Collins



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