NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
More Defense (Score:1)
I could patch SUPER to call
$invocant->can( '__get_parents' )before calling it in the eval, but this seems like a corner case. I'll think about it.Re: (Score:1)
I thought about that a little bit myself. It's definitely a corner case, but it can (demonstratedly) be a pretty serious benefit. Then again, "can" is a lying jerk and it means more overhead for all the code that would've worked just fine otherwise...
I think the best solution might just be for people to STOP USING AUTOLOAD... at least when it's not really the right (read: only) way to do something. This was clearly a gratuitous use of AUTOLOAD.
If you patch SUPER, though, I won't mind one bit!
rjbs
Re: (Score:1)
People who don't override
canwhen necessary are like people who don't check the return calls of system calls. Sure, you hope things will go right, but if you want to play nicely with the rest of the system, you ought to be a good neighbor.Re:More Defense (Score:1)
That’s true. However, it doesn’t alter the conclusion: if you can avoid
AUTOLOAD, you should. It is much likeevalandgoto LABELin that regard.Reply to This
Parent