So this is probably the most useless module ever, but I thought it was kind of fun, because... I don't know. I like writing things that seem like English but are actually Perl, I guess.


use Silly::Die; EXPR or die trying;
Where EXPR is, of course, an expression. For example:
open FILE, "foo" or die trying;
package Silly::Die; sub import { my $class = shift; my $caller = caller; no strict 'refs'; *{"${caller}::trying"} = \&{"${class}::trying"}; } sub trying { $! } 1;