good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Using eval: $@ isn't returning the error I expectby haukex (Archbishop) |
on Feb 20, 2020 at 00:35 UTC ( [id://11113213]=note: print w/replies, xml ) | Need Help?? |
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).
In Section
Seekers of Perl Wisdom
|
|