|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Issues when testing module loadingby andreas1234567 (Vicar) |
| on Jun 04, 2008 at 07:04 UTC ( #690071=note: print w/ replies, xml ) | Need Help?? |
|
The source of these warnings is that both POSIX and Date::Format happen to export the same subroutine names into the main:: namespace by default, such as sub strftime: Exporter says Exports pollute the namespace of the module user. If you must export try to use @EXPORT_OK in preference to @EXPORT and avoid short or common symbol names to reduce the risk of name clashes.In your case I guess it comes down to selectively exporting only those functions you are going to use, while carefully making sure you don't get any namespace collisions. I think it is bad practice of Date::Format to export a subroutine name by default that collides with another subroutine name from a package that is included in core perl. A possible patch to Format.pm could be:
-- No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||