Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Location of 'use' statements

by Beatnik (Parson)
on Apr 18, 2003 at 19:18 UTC ( #251516=note: print w/ replies, xml ) Need Help??


in reply to Location of 'use' statements

You do realize the order in which you use might be important when importing/poisining your namespace. The last modules used will overwrite any other subroutines that might be import. I think at some point in history, LWP::Simple and CGI clashed at something like that.

Greetz
Beatnik
... I'm belgian but I don't play one on TV.


Comment on Re: Location of 'use' statements
Select or Download Code
Re: Re: Location of 'use' statements
by djantzen (Priest) on Apr 18, 2003 at 23:12 UTC

    You mean if two modules export functions with the same name? In that case you'll have problems no matter what the order though, right? Fortunately I haven't encountered that problem before myself, but the possibility is just one more reason to use warnings. :^)


    "The dead do not recognize context" -- Kai, Lexx

      I'm quibbling over whether to be a fan of use warnings FATAL => 'all'; which would ensure you didn't do that by accident.

      Ofcourse you are in trouble but the order in which use is used determines which function is actually used.

      Greetz
      Beatnik
      ... I'm belgian but I don't play one on TV.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://251516]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2014-12-25 03:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls