But you seem to be confused about the difference between use and require
from the docs
Imports some semantics into the current package from the named module, generally by aliasing certain subroutine or variable names into your package. It is exactly equivalent to
BEGIN { require Module; Module->import( LIST ); }
except that Module must be a bareword. ...
BEGIN happens at compile-time, if you want to use a module at run-time, you always need to call
->import
too.
It's also an FAQ, plz see
--> What's-the-difference-between-require-and-use?
and plz follow the various links embedded in this node to round up the picture.°
HTH! :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) well you could already have followed some of them before
In reply to Re^3: inconsistent module access (require vs use)
by LanX
in thread inconsistent module access
by geoffleach
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |