1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#!perl
use strict ("subs", "vars", "refs");
use warnings ("all");
BEGIN { $ENV{LIST_MOREUTILS_PP} = 0; }
END { delete $ENV{LIST_MOREUTILS_PP} } # for VMS
use List::MoreUtils (":all");
use lib ("t/lib");
use Test::More;
use Test::LMU;
# use case provided my Michael Schwern
my @ol = (0 .. 3);
is(join(", ", slide { "$a and $b" } @ol), "0 and 1, 1 and 2, 2 and 3", "M. Schwern requested example");
is_dying('slide without sub' => sub { &slide(0 .. 3); });
done_testing;
|