Next | Tricks of the Wizards | 22 |
Another real example: Module has a function you want, but the name is wrong:
use Module 'function';
Perhaps this is no good because it overlaps some other function that you need
For example:
sub get { ... } # Clobbered by LWP::Simple::get use LWP::Simple; # Ouch --- exports `get' by default
Do this instead:
use LWP::Simple (); # Load, but don't import anything BEGIN { *webget = \&LWP::Simple::get }
use Module () is a weird special case
It loads Module but does not call import at all
Next | Copyright © 2003 M. J. Dominus |