On Tue, 2005-06-21 at 20:08 -0500, Rod Adams wrote:
> Should we then perhaps rename it to: DEPRECATED_PERL5_AUTOLOAD ?
Poster 1: I hate it!
Poster 2: I love it!
Poster 3: How about PERL_5_AUTOLOAD_DO_NOT_USE?
Poster 4: That's a stupid feature to add!
Poster 5: That's too much to type! Isn't
Maxim Sloyko skribis 2005-06-22 14:27 (+0400):
> Can we do "return undef" in this case? I mean. can undef mean a no-op
> in subref context?
That's a rather false value. I hope undef is not executable. It's a much
better idea to special case empty closures, IMO.
Juerd
--
http://convolution.nl/
Rod Adams skribis 2005-06-21 20:08 (-0500):
> Should we then perhaps rename it to: DEPRECATED_PERL5_AUTOLOAD ?
That sounds like a good idea. In fact, a pragma to enable it would not
be a bad idea either, IMO.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_h
Juerd wrote:
sub AUTOLOAD ($whatever) { # but no *[at]_
my $s = get_subref_for $whatever;
our &::($whatever) := $s;
return sub () { 1 };
Then the subref will not be executed, and the bug will very quickly be
discovered. I don't see any problem with this.
Can we do "return un