http://www.perlmonks.org?node_id=199385


in reply to Carp; errors ala DBI
in thread Carp; errors ala DBI

Please don't use AUTOLOAD in code for distribution.

You must be kidding, don't you? :-)

At least I saw two good modules which uses AUTOLOAD very well: CGI.pm and matts's DBIx::AnyDBD. CGI.pm uses it to delay compilation of certain subs - aka lazy compilation. In DBIx::AnyDBD, AUTOLOAD "inherits" DBI's database handles methods. At a glance, this is also doable by subclassing the DBI::db package. Dunno why matts chooses the AUTOLOAD approach instead of subclassing.