in reply to Re: How can I keep object arguments private
in thread How can I keep object arguments private

Thanks, that helped with the readmore tag.

The other problem seems to be more a problem of the object design. With
$self->{'countries'}->{$country_code}->{'fullname'}= $country; $self->{'countries'}->{$country_code}->{'warnings'} = \%warn; return $self->{'countries'};
I am able to return just the wanted values without deleting any other properties of the object.
Are there any other ways to return just the wanted value?

Replies are listed 'Best First'.
Re^3: How can I keep object arguments private
by pemungkah (Priest) on May 24, 2010 at 05:47 UTC
    Invoke laziness first: is there any reason I need to delete the other properties? Or will providing a wanted_value method (obviously a better name is needed!) suffice?