Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: The 'eval "require $module; 1"' idiom

by Anonymous Monk
on Apr 19, 2014 at 23:51 UTC ( #1082925=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $MODULE_WAS_LOADED = eval "require 'bar.pl'";
    print "Debug: MODULE_WAS_LOADED=$MODULE_WAS_LOADED\n";
    
  2. or download this
    # ... module code here ...
    
    ...
    value is simply whatever the last statement in the module evaluates
    to. Whatever the case, I'd prefer it not polluting my debug output."
    #EOF
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082925]
help
Chatterbox?
[ambrus]: 1nickg: obviously the gamers don't know. but anyway, I need the whole room backlit, because watching a monitor in a dark room (like many people do) is tiring for my eyes, even more so than doing it in a lit room.
[1nickt]: ambrus I agree. I suspect one's eyes are always trying to adjust across the boundary between very bright and very dark ... like a camera's autofocus struggling to choose the target.

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



    Results (320 votes). Check out past polls.