http://qs321.pair.com?node_id=142853


in reply to Am I asking for trouble with my own AUTOLOAD sub?

I'm wondering if there is something I'm not anticipating. Is there a problem with this approach that I don't see or am I just paranoid?

A bit of paranoia can be healthy.

One of the more robust and interesting AUTOLOADs I've seen is in CGI.pm (actually, in CGI::_compile, which CGI::AUTOLOAD delegates to). I recommend it for careful study. It shows a few edge cases that many examples don't cover.

I see that your AUTOLOAD doesn't actually introduce any new symbols in a package's namespace. Rather, it's just a backstop that make indirect subroutine calls. Is this what you intended?