1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  
     | 
    
      #!perl
use strict ("subs", "vars", "refs");
use warnings ("all");
use lib ("t/lib");
use List::MoreUtils::XS (":all");
use Test::More;
use Test::LMU;
# Normal cases
my @list = (1 .. 10000);
is_true(none_u { not defined } @list);
is_true(none_u { $_ > 10000 } @list);
is_false(none_u { defined } @list);
is_undef(none_u {});
leak_free_ok(
    none_u => sub {
        my $ok  = none_u { $_ == 5000 } @list;
        my $ok2 = none_u { $_ == 5000 } 1 .. 10000;
    }
);
is_dying('none_u without sub' => sub { &none_u(42, 4711); });
done_testing;
 
     |