Stas Bekman wrote: > 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 :)
Yup, that's right. >> 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 Yeah, I've just looked more closely at what it's doing, and I would have to agree to. This is a _good_ feature (and it's been checked in already, so +1 retro-actively) -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature