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

Re: [perl #24250] "return" required in some anonymous closures

Yitzchak Scott-Thoennes
October 21, 2003 13:47
Re: [perl #24250] "return" required in some anonymous closures
Message ID:
On Tue, Oct 21, 2003 at 09:34:24PM +0100, Dave Mitchell <> wrote:
> On Tue, Oct 21, 2003 at 10:14:48PM +0200, Elizabeth Mattijsen wrote:
> > At 12:54 -0700 10/21/03, Yitzchak Scott-Thoennes wrote:
> > > > If any cleverer ways are devised of handling large numbers of imported
> > >> constants, a la POSIX, then and/or can be hacked
> > > > to accomodate them.
> > >That doesn't sound like something to do for 5.8.2 if released in a few
> > >weeks.  How doable would it be to give a warning for "const" padsv
> > >anon subs, and just have turn off the warning?
> > 
> > The way I understand it now, is that the check for making this 
> > special case is somehow wrong.  How difficult would it be to add a 
> > check there that it would do the optimization if the current package 
> > is "" ?  And just not do the optimization otherwise?
> > 
> > Just as a stopgap for now...
> In the medium-term, I want to remove the sub(){$x} feature from Perl,
> and also make do it another way. Both are relatively easy to
> do (although in the longer term there may be even cleverer ways of doing
> it in that would be harder to do but more efficient).
> However, in the short term (ie for 5.8.2), neither of these changes should
> happen (I'm not even sure if they should happen in any 5.8.x release).

Given that we have a report of the feature breaking code as of 5.8.0,
it would be advisable to fix it in the end-of-yearish 5.8.x release.

> So the only real question for 5.8.2 is whether we want to add a
> deprecation warning for the feature we added (undocumented) in 5.8.0
> and which we intend to remove in 5.10.0 (conscensus permitting).

The point of a warning seems more to me to be for when the coder didn't
want a constant that for when he/she did. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About