From: Sven Schöling Date: Wed, 11 Mar 2009 12:59:23 +0000 (+0000) Subject: und nochmal überarbeitet. X-Git-Tag: release-2.6.0beta2~148 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e43cccf42dc51e144dd39ca4190221c130b2af20;p=kivitendo-erp.git und nochmal überarbeitet. --- diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 16e1b4675..aa05abab5 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -586,25 +586,22 @@ sub cross(&\@\@) { local (*A, *B) = @_; # syms for caller's input arrays # Localise $a, $b - my ($caller_a, $caller_b) = do - { + my ($caller_a, $caller_b) = do { my $pkg = caller(); no strict 'refs'; \*{$pkg.'::a'}, \*{$pkg.'::b'}; }; - my $limit = $#A > $#B? $#A : $#B; # loop iteration limit - local(*$caller_a, *$caller_b); - # This map expression is also the return value. - map { my $b_index = $_; - map { my $a_index = $_; + # This map expression is also the return value. + map { my $a_index = $_; + map { my $b_index = $_; # assign to $a, $b as refs to caller's array elements (*$caller_a, *$caller_b) = \($A[$a_index], $B[$b_index]); $op->(); # perform the transformation - } 0 .. $#A; - } 0 .. $#B; + } 0 .. $#B; + } 0 .. $#A; } 1;