![]() |
|
go ahead... be a heretic | |
PerlMonks |
perlman:lib:autouseby root (Monk) |
on Dec 23, 1999 at 00:49 UTC ( [id://1133]=perlfunc: print w/replies, xml ) | Need Help?? |
lib:autouseSee the current Perl documentation for lib:autouse. Here is our local, out-dated (pre-5.6) version: ![]() autouse - postpone load of modules until a function is used
![]()
use autouse 'Carp' => qw(carp croak); carp "this carp was predeclared and autoused ";
![]()
If the module
use autouse 'Module' => qw(func1 func2($;$) Module::func3); is equivalent to
use Module qw(func1 func2);
if
If the module
WARNING
Using
To alleviate the second problem (partially) it is advised to write your scripts like this:
use Module; use autouse Module => qw(carp($) croak(&$)); carp "this carp was predeclared and autoused "; The first line ensures that the errors in your argument specification are found early. When you ship your application you should comment out the first line, since it makes the second one useless.
AUTHORIlya Zakharevich (ilya@math.ohio-state.edu)
SEE ALSO
|
|