The only thing I would worry about is that there is no guarantee that keys or values called on %hash more than once will return them in the same order. And keys %hash and values %hash might not return them in the same order
At least that is what I understood. If I am wrong, please tell me. Or is this something that "works" but isn't "right"?
I would probably (untested)
l8rZ,sub _init { my ($self, %initdata) = @_; if (%initdata) { map { $self{$_} = $initdata{$_} } keys %initdata; } }
In reply to Re: Make sense?
by afresh1
in thread Make sense?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |