in reply to How do I make one package use a module from another package?

The question isn't 'how' but 'why'? The thing you say you want to do,nobody should do. Is this some sort of joke?

You should read the source for the module you reference. Hint: Don't use from any program you'd ever like to use again.

--Bob Niederman, http://bob-n.com
  • Comment on Re: How do I make one package use a module from another package?

Replies are listed 'Best First'.
Re: Re: How do I make one package use a module from another package?
by Anonymous Monk on Jul 22, 2003 at 04:08 UTC
    He he... yes, I just noticed the unlink in there. Silly me. I guess that module was a bad example!

    Oh great, now I can't modify my original post because I did it anonymously. I wonder how many people are going to point out what you just did. :)

      I may have meisunderstood your original post. If you want to use strict; use warnings, why not just do so?

      Those 2 things can't be doen from a separate module to affect the calling program - their effect is lexically scoped, so it can apply, at most, to the file it is in.

      Anyhow, I saw the word "pollute" and thought you were talking about a module that would import from yet other modules and then export to main:: and I can't help thnking that that way lies madness. Large function modules that break things down into smaller modules do so by inheritance, not import/export. Look at LWP::UserAgent for example, and try to find where the headers are set/interpreted, etc.

      --Bob Niederman, http://bob-n.com
        No, I think you got what I was saying. I want to pollute. What's the best way of doing this? Why is inheritance better than import/export? Why does madness lie yonder?

      Reply to your original post with your corrections. Use tags to emphasize your corrections and catch peoples' eyes, say <b>corrected stuff</b>

      --Bob Niederman, http://bob-n.com