in reply to Re: Preventing used modules from leaking to main script
in thread Preventing used modules from leaking to main script
The use IO::Socket::INET; should be in the main if main is going to call it!
And that's exactly what I want to enforce.
Perhaps I didn't make myself clear enough. What I'm saying is that there is apparently no way right now to make sure that your script/module has a use (or require) statement for every module it's using.
It's happened to me on multiple occasions that I forgot to add a use statement (most often when adding the very first Data::Dumper debug message in a script), and instead of breaking right away the script would work fine until I removed an unrelated module which did happen to use Data::Dumper.
(Of course you can very well make the argument that not checking to make sure you've included all needed modules is sloppy coding.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Preventing used modules from leaking to main script
by Hue-Bond (Priest) on Sep 20, 2006 at 17:02 UTC | |
|
Re^3: Preventing used modules from leaking to main script
by jdtoronto (Prior) on Sep 20, 2006 at 17:55 UTC |