perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [PATCH] Apache2::Reload
Date Mon, 22 Aug 2005 17:54:29 GMT
Philippe M. Chiasson wrote:
> Geoffrey Young wrote:
> 
>>>-    while (my($key, $file) = each %Apache2::Reload::INCS) {
>>>+    foreach my $key (sort { $a cmp $b } keys %Apache2::Reload::INCS) {
>>>+        my $file = $Apache2::Reload::INCS{$key};

>>I hate each.
> 
> 
> each is perfect when iterating over a large hash and not caring about ordering.
> Doesn't need to build a large array to hold _all_ the keys, so it's a major
> speed improvement.

right, but A-R is a dev module :) (well most of the time :)

> I am not sure what is gained here by sorting ?

Just that what Philip was after: easier to spot whether some module was 
reloaded or not.

+1

-- 
__________________________________________________________________
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://ticketmaster.com

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


Mime
View raw message