There's more than one way to do things | |
PerlMonks |
Re^4: Check if module is installedby JavaFan (Canon) |
on Nov 16, 2009 at 11:46 UTC ( [id://807420]=note: print w/replies, xml ) | Need Help?? |
Checking $@ is not an appropriate way to check if an eval failed. An eval can fail, but in the clean up (DESTROY for instance), something can unset $@.
The only way to make sure an eval succeeded is to check its return value:
In Section
Seekers of Perl Wisdom
|
|