Importer
view release on metacpan or search on metacpan
use strict;
use warnings;
use Importer 'Test::More';
my $CLASS = 'Importer';
sub dies(&) {
my $code = shift;
my $err;
{
local $@;
eval { $code->(); 1 } and return undef;
$err = $@;
}
$@ = $err;
return $err || 1;
}
sub warns(&) {
my $code = shift;
my $warn;
my $warned = 0;
local $SIG{__WARN__} = sub { ($warn) = @_; $warned++ };
$code->();
return undef unless $warned;
return $warn || $warned;
( run in 0.836 second using v1.01-cache-2.11-cpan-49f99fa48dc )