NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Could you still have an option to make it die? (Score:1)
Re:Could you still have an option to make it die? (Score:2)
1) People would write
$module->requirewithout realizing it wouldn't die on error.Well,
require_or_die()doesn't help with that. If they don't think$module->requiredoesn't die they'll probably never noticerequire_or_die().2)
$module->require or die $UNIVERSAL::require::ERRORis nasty.$module->require or die $@is nearly as short as$module->require_or_dieSo not really worth it.
Reply to This
Parent
Re:Could you still have an option to make it die? (Score:1)
How about an option when you use the module:
use UNIVERSAL::require qw/fatal/;
SomeModule->require; # blows up
?
Re:Could you still have an option to make it die? (Score:2)