Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hello jahero, and welcome to the Monastery! You can control what is imported by specifying imports explicitly as part of the use declaration. For example, if you change your code to:
then the basename function in File::Basename will not be imported, so defining your own sub basename will not produce a namespace collision. If you then wanted to call the function of that name in File::Basename, you would need to qualify it fully:
See the documentation for use. Hope that helps,
In reply to Re: Namespaces & colliding names
by Athanasius
|
|