lib->unimport ???

B

bill

The version of lib.pm installed in our system includes a definition
for a sub called unimport. It is not used elsewhere in lib.pm,
and it is not mentioned in the POD for lib. Also 'perldoc -f
unimport' turns up nothing (same for 'perldoc -q unimport' for that
matter). So why does lib define unimport at all? I became aware
of it when I found "lib->unimport" while reading some fairly eminent
module's source, from CPAN. The author of this module has produced
some very widely used modules, so I don't think this person would,
without good reason, break the precept of never going outside the
published API.

So, what's the official status of lib->unimport ? Should it be
regarded as if it were part of lib's published API?

And what about unimporting other modules besides lib?

-bill
 
J

Jeff 'japhy' Pinyan

The version of lib.pm installed in our system includes a definition
for a sub called unimport. It is not used elsewhere in lib.pm,
and it is not mentioned in the POD for lib. Also 'perldoc -f
unimport' turns up nothing (same for 'perldoc -q unimport' for that
matter). So why does lib define unimport at all? I became aware
of it when I found "lib->unimport" while reading some fairly eminent
module's source, from CPAN. The author of this module has produced
some very widely used modules, so I don't think this person would,
without good reason, break the precept of never going outside the
published API.

'unimport' is the method called when you write

no Module;

just like 'import' is the method called when you write

use Module;

See 'perldoc -f use' for more information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,413
Latest member
KeiraLight

Latest Threads

Top