Test2-Harness-UI
view release on metacpan or search on metacpan
t/HashBase.t view on Meta::CPAN
123456789101112131415161718192021222324use
strict;
use
warnings;
use
Test::More;
sub
warnings(&) {
my
$code
=
shift
;
my
@warnings
;
local
$SIG
{__WARN__} =
sub
{
push
@warnings
=>
@_
};
$code
->();
return
\
@warnings
;
}
sub
exception(&) {
my
$code
=
shift
;
local
($@, $!,
$SIG
{__DIE__});
my
$ok
=
eval
{
$code
->(); 1 };
my
$error
= $@ ||
'SQUASHED ERROR'
;
return
$ok
?
undef
:
$error
;
}
BEGIN {
$INC
{
'Object/HashBase/Test/HBase.pm'
} = __FILE__;
( run in 0.386 second using v1.01-cache-2.11-cpan-05444aca049 )