in reply to Re: Make sense?
in thread Make sense?
since there is no indication of the existance of a %self hash, or the relevance of such a hash to the object.map { $self->{$_} = $initdata{$_} } keys %initdata;
My preference would be to simplify it to :
which, although representing infinitasmally more overhead, has an elegant simplicity to it.%$self = (%$self, %initdata);
If you really wanted to be non-destructive of $self or $_[0], you could:
which, to me, is slightly more readable/DWIM, compared to a "map" whose result is thrown away.$self->{$_}=$initdata{$_} for keys %initdata;
"An undefined problem has an infinite number of solutions." - Robert A. Humphrey "If you're not part of the solution, you're part of the precipitate." - Henry J. Tillman
|
|---|