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

Re: RFC: Overridable keywords ([perl #96116] File::Glob ':glob' causes infinite loop)

Thread Previous
From:
Father Chrysostomos via RT
Date:
October 27, 2011 14:43
Subject:
Re: RFC: Overridable keywords ([perl #96116] File::Glob ':glob' causes infinite loop)
Message ID:
rt-3.6.HEAD-31297-1319751786-116.96116-15-0@perl.org
On Thu Oct 27 13:00:50 2011, sprout wrote:
> On Thu Oct 27 12:58:36 2011, sprout wrote:
> > We could continue to have that work for <...>, but then how does
> > List::Gen::glob tell the difference between <*> and glob('*',42)?  One
> > solution to that is to continue to treat glob overrides specially under
> > ‘use v5.16’ as long as the subroutine itself was *not* declared under
> > ‘use v5.16’.
> 
> XS modules are not really declared in any Perl scope, but XS glob
> overrides are rare enough I don’t think we have to worry about that.

This also affects subroutines declared under ‘use v5.16’.  How are
*they* to distinguish between <*.c> and glob('*.c', '*.a')? 
(looks_like_number($_[1]) is too fragile.)  Since glob() would have to
use some other means than the second argument (e.g., Devel::CallSite) to
determine the caller, maybe that could apply to <...> as well, when it
calls a glob override.  I.e., it shouldn’t pass the magic second argument.

This is much more of a mess than I’d hoped....

(I hope somebody is reading this and has some ideas.)



Thread Previous


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