"be consistent" | |
PerlMonks |
Class::Std, 5.6.1, and AUTOLOADby rjbs (Pilgrim) |
on Sep 22, 2005 at 15:51 UTC ( [id://494180]=perlquestion: print w/replies, xml ) | Need Help?? |
rjbs has asked for the wisdom of the Perl Monks concerning the following question:
Recently, looking at Class::Std, a friend of mine complained that it was failing its tests on 5.6.1; it complained about deep recursion in AUTOLOAD. He later said that the problem was this:
The handler for ATTR ends up getting called at compile time, and it, in turn, uses _extract_default. That isn't defined yet (because the ATTR handler (MODIFY_HASH_ATTRIBUTES) is being called at compile time) so AUTOLOAD gets called. AUTOLOAD, in turn, uses ID, which isn't defined yet, so it calls AUTOLOAD...! Deep recursion happens, and we all cry. Why isn't this a problem under, say, perl 5.8.7?
rjbs
Back to
Seekers of Perl Wisdom
|
|