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

use Module::Load; eval { autoload 'cPanelUserConfig'; 1 } or print "toast";

This code works fine for me. Are you sure this is exactly the code you tried?

Also, just to make sure, tell us what version of Perl and the module you're using, as given by perl -MModule::Load -le 'print $]; print $Module::Load::VERSION' (on the command line).

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:31 UTC
    Yes, I copied directly from the script and pasted it into my reply. My local machine is running Perl v5.18.2. Appreciate all the help!