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

Re^3: Using eval: $@ isn't returning the error I expect

by haukex (Archbishop)
on Feb 20, 2020 at 00:35 UTC ( [id://11113213]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using eval: $@ isn't returning the error I expect
in thread [SOLVED] Using eval: $@ isn't returning the error I expect

It would seem that the "eval" command isn't actually loading the cPanelUserConfig module on the host server. Only the explicit "use" statement seems to work there.

If it's not showing a warning, then it is loading it, but there's a difference: eval STRING delays the execution of the use until runtime, while normally it would run at compile time. Try adding a BEGIN { ... } block around the whole line, that'll move the execution back into compile time (see BEGIN in perlmod).

Replies are listed 'Best First'.
Re^4: Using eval: $@ isn't returning the error I expect
by doctormelodious (Acolyte) on Feb 20, 2020 at 00:44 UTC
    BINGO!!

    I moved it to the BEGIN block that was already in place, and that did the trick.

    Thanks mucho!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found