CUFP
btrott
snippet
<div class="Description">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.<p>
Usage:
<code>
use Silly::Die;
EXPR or die trying;
</code>
Where EXPR is, of course, an expression. For
example:
<code>
open FILE, "foo" or die trying;
</code></div>
<CODE>
package Silly::Die;
sub import {
my $class = shift;
my $caller = caller;
no strict 'refs';
*{"${caller}::trying"} = \&{"${class}::trying"};
}
sub trying { $! }
1;
</CODE>