in reply to Being impervious to an 'each' reset

You could assign %some::...::module::food to another hash and iterate over that, in which case you'll be iterating over an entirely different hash.
use Data::Dumper; my %hash1 = ( key1 => 'hello', key2 => 'world' ); my %hash2 = %hash1; print Dumper \%hash1; print Dumper \%hash2;
However, the code you posted makes me uncomfortable. You seem to be tinkering with some guts that shouldn't be tinkered with.

Replies are listed 'Best First'.
Re^2: Being impervious to an 'each' reset
by duckyd (Hermit) on Dec 14, 2006 at 00:15 UTC
    You could avoid copying the large hash by using a reference:
    my $thingy_ref = \%Foo::Bar::Baz::thingy; foreach my $key ( keys %$thingy_ref ){ print "$key => $thingy_ref->{ $key }\n"; }

      Erm, then you'd have a reference to the same hash you're trying to avoid resetting the each iterator and the OP would be back to square one. The iterator is a property of the underlying hash, not how it's accessed.