Acme::AutoloadAll - Use every function everywhere.
version 0.005
use Scalar::Util (); use Acme::AutoloadAll; if (looks_like_number(42)) { print "yay\n"; }
This module allows you to call any function ever seen by your perl instance. As long as you used/required a module in the past you can now call its functions everywhere.
The module puts an AUTOLOAD sub into UNIVERSAL so every package has it. When it is called (i.e. your current package doesn't have the called sub itself) it traverses all known packages (it examines main:: and from there on everything else). The first found function will then be executed.
Obviously calling 'new' in a package that does not have it is kind of not clever as a lot of packages have that sub. So you cannot really be sure which one is called...
Also calling subs working on a $self only works, if your package has the guts the called sub expects.
Other than that it might collide with other AUTOLOADs, so use with care ;-)
As calling inherited AUTOLOAD on non member subs is deprecated this module might stop working in the future...
Acme::Everything
Felix Bytow <felix.bytow@googlemail.com>
This software is copyright (c) 2015 by Felix Bytow.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Acme::AutoloadAll, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::AutoloadAll
CPAN shell
perl -MCPAN -e shell install Acme::AutoloadAll
For more information on module installation, please visit the detailed CPAN module installation guide.