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:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]