Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^5: eval "require $class" seems wrong (1)

by tye (Sage)
on Aug 22, 2007 at 19:23 UTC ( #634488=note: print w/replies, xml ) Need Help??

in reply to Re^4: eval "require $class" seems wrong (--!$@)
in thread eval "require $class" seems wrong

Yes, and the space is equally "useless" because require"$" works just fine. That doesn't mean I'm going to drop either of them.

The "; 1" is part of the best practice. It may not change the effect of this particular code, but it means I don't have to worry about whether the preceeding code might return a false value rather than dieing. It also tells the reader that I'm testing whether eval succeeded not whether the eval'd code returned a true value (which also makes it clearer why I'm using eval at all).

- tye        

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2020-10-25 21:03 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (249 votes). Check out past polls.