We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day jahero, Welcome to the Monastery. ++Athanasius showed in his response how to stop all imports with:
However, there may be cases where you only want to stop some, but not all, imports. Still using File::Basename as an example, let's say you wanted its dirname() function. You can specify importation of that function like this:
Module documentation will often identify which functions are exported by default and which are optionally exported; however, presence of this information is by no means guaranteed. You can check for yourself by looking at the source code: @EXPORT lists the default exports and @EXPORT_OK lists the optional ones. For example, the File::Basename source code shows four default exports:
See Exporter for a lot more information on this including advanced features. For instance, to exclude basename() only, you could write:
— Ken In reply to Re: Namespaces & colliding names
by kcott
|
|