in reply to Re: Dumping Tie Objects
in thread Dumping Tie Objects
Try (untested):
Update: keys resets the internal iterator of a hash. In void context, this happens with no other overhead, so the use of scalar above is only for the purpose of self-documentation.sub FIRSTKEY { my ($self) = @_; scalar keys %$Self; return each %{ $self->{'value'} }; }
Also: On second thought, I would be inclined to implement FIRSTKEY in terms of NEXTKEY (also untested):
sub FIRSTKEY { my ($self) = @_; keys %$Self; return $self->NEXTKEY; }
|
|---|