diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-04-16 13:44:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-04-16 13:44:14 +0000 |
commit | f95bae8026a539fcd4c2e7fde188a959a6b78169 (patch) | |
tree | ed0aa6cc2cb318addb2d55e30f79a7cda7464099 /MDK | |
parent | 3f4b378563c6988b94d9c27169b541fae5873448 (diff) | |
download | perl-MDK-Common-f95bae8026a539fcd4c2e7fde188a959a6b78169.tar perl-MDK-Common-f95bae8026a539fcd4c2e7fde188a959a6b78169.tar.gz perl-MDK-Common-f95bae8026a539fcd4c2e7fde188a959a6b78169.tar.bz2 perl-MDK-Common-f95bae8026a539fcd4c2e7fde188a959a6b78169.tar.xz perl-MDK-Common-f95bae8026a539fcd4c2e7fde188a959a6b78169.zip |
MDK::Common::Func: map_index, each_index and grep_index do not pass $::i as
a parameter anymore (this breaks backward compatibility, but it is cleaner and
otherwise perl_checker doesn't handle it correctly)
Diffstat (limited to 'MDK')
-rw-r--r-- | MDK/Common.pm.pl | 2 | ||||
-rw-r--r-- | MDK/Common/Func.pm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/MDK/Common.pm.pl b/MDK/Common.pm.pl index 1227f91..3c08fee 100644 --- a/MDK/Common.pm.pl +++ b/MDK/Common.pm.pl @@ -71,7 +71,7 @@ use vars qw(@ISA @EXPORT $VERSION); #); # perl_checker: RE-EXPORT-ALL @EXPORT = map { @$_ } map { values %{'MDK::Common::' . $_ . 'EXPORT_TAGS'} } grep { /::$/ } keys %MDK::Common::; -$VERSION = "1.0.5"; +$VERSION = "1.1.0"; 1; EOF diff --git a/MDK/Common/Func.pm b/MDK/Common/Func.pm index caa5358..7ce9d5a 100644 --- a/MDK/Common/Func.pm +++ b/MDK/Common/Func.pm @@ -236,20 +236,20 @@ sub every(&@) { sub map_index(&@) { my $f = shift; my @v; local $::i = 0; - map { @v = &$f($::i); $::i++; @v } @_; + map { @v = $f->(); $::i++; @v } @_; } sub each_index(&@) { my $f = shift; local $::i = 0; foreach (@_) { - &$f($::i); + &$f->(); $::i++; } } sub grep_index(&@) { my $f = shift; my $v; local $::i = 0; - grep { $v = &$f($::i); $::i++; $v } @_; + grep { $v = $f->(); $::i++; $v } @_; } sub find_index(&@) { my $f = shift; |