in reply to Caller, caller, wherefore art thou, caller?
That is, if you were simply doing
you'd still have a dangling iterator, which you'd need to reset with an explicit call to keys %hash.my %hash = @array; while ( my($k,$v) = each %hash ) { last if some_condition($k,$v); }
Since your hash object's semantics seem to be so similar to perl's, I'd go all the way and make them exactly the same, on the principle of least surprise.
(That being said, I don't know why you don't wrap your object in a tied class...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Caller, caller, wherefore art thou, caller?
by Ovid (Cardinal) on Oct 10, 2005 at 17:33 UTC |