perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: svn commit: r239724 - /perl/modperl/trunk/lib/Apache2/Build.pm
Date Wed, 24 Aug 2005 20:04:49 GMT

> +sub cmp_tuples {
> +
> +    my($a, $b) = @_;
> +
> +    while (@$a && @$b) {
> +        my $cmp = shift @$a <=> shift @$b;
> +        return $cmp if $cmp;
> +    }
> +
> +    return @$a <=> @$b;
> +}

Philip, please avoid using $a and $b in any code, but sort() callbacks, as 
they are special in perl and may have bad side effects.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://mailchannels.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message