Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

comment on

( #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

use XML::*;

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
in thread Being helpful to a fault? by graff

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2021-10-22 20:30 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.