From: Yves Orton Date: Sun, 6 Jan 2008 21:43:24 +0000 (+0000) Subject: Silence new warning grep in void context warning in various modules and test files... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f84167b37281b9fdf1ae6a39e5b09c601c781ffa;p=p5sagit%2Fp5-mst-13.2.git Silence new warning grep in void context warning in various modules and test files, also silence a warning that came from a previous 'dev' version number bump. p4raw-id: //depot/perl@32883 --- diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 42913fb..e8e0c00 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -165,7 +165,8 @@ our ($db_version, $use_XSLoader, $splice_end_array, $Error); use Carp; -$VERSION = "1.816_1" ; +$VERSION = "1.816_2" ; +$VERSION = eval $VERSION; { local $SIG{__WARN__} = sub {$splice_end_array = "@_";}; diff --git a/ext/DB_File/t/db-btree.t b/ext/DB_File/t/db-btree.t index cb5ff43..d6966da 100755 --- a/ext/DB_File/t/db-btree.t +++ b/ext/DB_File/t/db-btree.t @@ -1472,7 +1472,7 @@ ok(165,1); $h{"fred"} = "joe" ; ok(173, $h{"fred"} eq "joe"); - eval { grep { $h{$_} } (1, 2, 3) }; + eval { my @r= grep { $h{$_} } (1, 2, 3) }; ok (174, ! $@); @@ -1488,7 +1488,7 @@ ok(165,1); ok(176, $db->FIRSTKEY() eq "fred") ; - eval { grep { $h{$_} } (1, 2, 3) }; + eval { my @r= grep { $h{$_} } (1, 2, 3) }; ok (177, ! $@); undef $db ; diff --git a/ext/DB_File/t/db-hash.t b/ext/DB_File/t/db-hash.t index e8f23c9..889bbe9 100755 --- a/ext/DB_File/t/db-hash.t +++ b/ext/DB_File/t/db-hash.t @@ -970,7 +970,7 @@ EOM $h{"fred"} = "joe" ; ok(137, $h{"fred"} eq "joe"); - eval { grep { $h{$_} } (1, 2, 3) }; + eval { my @r= grep { $h{$_} } (1, 2, 3) }; ok (138, ! $@); @@ -986,7 +986,7 @@ EOM ok(140, $db->FIRSTKEY() eq "fred") ; - eval { grep { $h{$_} } (1, 2, 3) }; + eval { my @r= grep { $h{$_} } (1, 2, 3) }; ok (141, ! $@); undef $db ; diff --git a/ext/DB_File/t/db-recno.t b/ext/DB_File/t/db-recno.t index 26bae07..1eed35b 100755 --- a/ext/DB_File/t/db-recno.t +++ b/ext/DB_File/t/db-recno.t @@ -994,7 +994,7 @@ EOM $h[0] = "joe" ; ok(155, $h[0] eq "joe"); - eval { grep { $h[$_] } (1, 2, 3) }; + eval { my @r= grep { $h[$_] } (1, 2, 3) }; ok (156, ! $@); @@ -1008,7 +1008,7 @@ EOM ok(157, $h[1] eq "joe"); - eval { grep { $h[$_] } (1, 2, 3) }; + eval { my @r= grep { $h[$_] } (1, 2, 3) }; ok (158, ! $@); undef $db ; diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm index 641bb01..32dfcfd 100644 --- a/ext/GDBM_File/GDBM_File.pm +++ b/ext/GDBM_File/GDBM_File.pm @@ -68,7 +68,8 @@ use XSLoader (); GDBM_WRITER ); -$VERSION = "1.08"; +$VERSION = "1.08_01"; +$VERSION = eval $VERSION; sub AUTOLOAD { my($constname); diff --git a/ext/GDBM_File/t/gdbm.t b/ext/GDBM_File/t/gdbm.t index 87e30d0..53a2ae5 100755 --- a/ext/GDBM_File/t/gdbm.t +++ b/ext/GDBM_File/t/gdbm.t @@ -487,7 +487,7 @@ EOM $h{"fred"} = "joe" ; ok(76, $h{"fred"} eq "joe"); - eval { grep { $h{$_} } (1, 2, 3) }; + eval { my @r= grep { $h{$_} } (1, 2, 3) }; ok (77, ! $@); @@ -503,7 +503,7 @@ EOM ok(79, $db->FIRSTKEY() eq "fred") ; - eval { grep { $h{$_} } (1, 2, 3) }; + eval { my @r= grep { $h{$_} } (1, 2, 3) }; ok (80, ! $@); undef $db ; diff --git a/lib/CGI.pm b/lib/CGI.pm index 8ac257a..6d5ddc9 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -19,7 +19,9 @@ use Carp 'croak'; # http://stein.cshl.org/WWW/software/CGI/ $CGI::revision = '$Id: CGI.pm,v 1.240 2007/11/30 18:58:27 lstein Exp $'; -$CGI::VERSION='3.33_01'; +$CGI::VERSION='3.33_02'; +$CGI::VERSION=eval $CGI::VERSION; + # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. @@ -3292,10 +3294,10 @@ sub previous_or_default { if (!$override && ($self->{'.fieldnames'}->{$name} || defined($self->param($name)) ) ) { - grep($selected{$_}++,$self->param($name)); + $selected{$_}++ for $self->param($name); } elsif (defined($defaults) && ref($defaults) && (ref($defaults) eq 'ARRAY')) { - grep($selected{$_}++,@{$defaults}); + $selected{$_}++ for @{$defaults}; } else { $selected{$defaults}++ if defined($defaults); } diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm index dc6d5e7..619b134 100644 --- a/lib/ExtUtils/Embed.pm +++ b/lib/ExtUtils/Embed.pm @@ -281,7 +281,7 @@ sub canon { s:^(lib|ext)/(auto/)?::; s:/\w+\.\w+$::; } - grep(s:/:$as:, @ext) if ($as ne '/'); + map(s:/:$as:, @ext) if ($as ne '/'); @ext; } diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 9a8e0e8..4550727 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -19,6 +19,7 @@ use vars qw($VERSION @ISA use ExtUtils::MakeMaker qw($Verbose neatvalue); $VERSION = '6.42_01'; +$VERSION = eval $VERSION; require ExtUtils::MM_Any; @ISA = qw(ExtUtils::MM_Any);