In \"Perl Best Practices\" the very first line in the section on AUTOLOAD is:
Don\'t use AUTOLOAD
However all t
An alternative strategy would be to write the script as an App::* module and have the commandline option choose which class to load to provide whatever functionality it is that's pluggable depending on the option. You would require
that class just-in-time once you know which it is. It's a little more up-front work, but if you intend to maintain the script for a long time, I bet it would pay off. The past couple years have seen the creation of some extra-nice tools for creating scripts whose functionality really lives in modules, including App::Cmd, MooseX::Getopt, and the bastard offspring of both.