Subscribed unsubscribe Subscribe Subscribe

test::deep::matcher && test::deep::cond

use Test::Deep;
use Test::Deep::Matcher;
use Test::Deep::Cond;

my $arr = [1,2,3,4,5];

cmp_deeply(
    $arr,
    array_each(is_integer) && cond { scalar @$_ == 5 }
);

って書けるの分かりやすくて便利な気がしました。