more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Regarding your first question, I don't think there is a situation where you would want to, by default, load in every module in a directory. Could you imagine seeing
in someone's code? Not cool. I can see the motivation of the original question and how it could occur and why someone might think that it is what they want, and I'm guessing that its related to Object Oriented Perl. Let's say you have a perl class Foo, with subclasses Foo::A, Foo::B, and Foo::C. Now, if you have a script that could have any of those classes returned from a function call you would need to include all those packages. Now, if the function called from your script is changed to also return Foo::D, your script will likely be broken. On your second question, I typically point to the larger problem if I can see one, and provide some options to solving the larger problem. I won't, however, go into a typical question assuming there is a major flaw in their design. In the case with this question, I'm assuming the layout of their modules, while working fine for their initial design, development, and testing, are turning into a pain when modified. Now, a change in file A is forcing changes in file B. If that is truly the deeper problem, rather than trying to work around use, they should look to placing the classes in question into a single file. In reply to Re: Being helpful to a fault?
by Steve_p
|
|