Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: An Interesting Gotcha With use/require (a fix)

by periapt (Hermit)
on Feb 09, 2005 at 17:21 UTC ( #429431=note: print w/replies, xml ) Need Help??


in reply to Re: An Interesting Gotcha With use/require (a fix)
in thread An Interesting Gotcha With use/require

Is this useful for all programs regardless of whether they use classes or not?

PJ
use strict; use warnings; use diagnostics;
  • Comment on Re^2: An Interesting Gotcha With use/require (a fix)

Replies are listed 'Best First'.
Re^3: An Interesting Gotcha With use/require (a fix)
by tye (Sage) on Feb 09, 2005 at 18:17 UTC

    It's useful (or can be) in programs that use use. Note that use (quoting the documentation) is equivalent to:

    BEGIN { require Module; import Module LIST; }

    and "import Module List" is "Module->import( List )", which is "using a class" even if 'Module' isn't object-oriented.

    If you never use use, then that code will never matter.

    - tye        

      Hmmm, thanks tye I'll definitely take a closer look at this

      PJ
      use strict; use warnings; use diagnostics;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://429431]
help
Chatterbox?
[LanX]: <|--
[choroba]: Reminds me of an old joke about an orchestra...
erix imagines that in a true Lancs accent
[choroba]: so a Czech orchestra rehearses a new piece by a German composer
LanX LOL of the day ... the Turkish Anonymous Alcoholics stopped their "No to alcohol" campaign for political reasons ...
LanX omg my browser is posting again on its own ...
[LanX]: choroba: GREAT JOKE! xD
LanX starts googling the punch line ...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-03-27 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (319 votes). Check out past polls.