Subject: | Patch for bug in t/all_tests.t List-Utils v0.05 |
Hi Terrence!
Installing latest version of List-Utils on RedHat Linux 7.3/Perl 5.6.0, I got the following warnings while running 'make test':
''my'' variable $r masks earlier declaration in same scope at t/all_tests.t line 38
''my'' variable $r masks earlier declaration in same scope at t/all_tests.t line 45
Attached you should find a patch wherein I comment out the second and third instances of 'my $r = '
Jim Keenan
use strict;
use Test;
use List::Utils qw(:all);
use Data::Dumper;
BEGIN { plan tests => 7 }
my @all_true = (1..400);
my @all_false = ("", undef, 0);
my @notall_true = (42,42,42,0,42,42,42,0);
my @violent_femme = qw(this must be hallowed ground);
#1
ok(all(@all_true));
#2
ok(none(@all_false));
#3
ok(notall(@notall_true));
#4
ok(true(@notall_true),6);
#5
ok(false(@notall_true),2);
#6
ok(index_for_which(sub { shift() eq 'hallowed' }, \@violent_femme), 3);
#7
ok(index_for_which(sub { shift() eq 'this' }, \@violent_femme), 0);
my $r = insert_after_string ('be', 'very', \@violent_femme);
my $I = index_for_which(sub { length(shift()) == 8 }, \@violent_femme);
# my $r = _insert_after ($I,
$r = _insert_after ($I, # patched by Jim Keenan 4/16/2004
'compound_insert',
\@violent_femme
);
#warn Dumper($r);
# my $r = insert_after (sub { length(shift()) == 8 },
$r = insert_after (sub { length(shift()) == 8 }, # patched by Jim Keenan 4/16/2004
'second_innsert',
\@violent_femme
);
#warn Dumper($r);