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

Thanks a lot FalseVinylShrub and ikegami for your detailed answers!!

There is no need to keep the method options in the object. So, as you pointed, it is a good idea to keep them in a variable. Since I want to distinguish between fullname and warnings I store this values in a hash
$country_warnings->{$country_code}->{'fullname'} =$country; $country_warnings->{$country_code}->{'warnings'} = \%warn; return $country_warnings;
Doing this gets me a return value that I want: MeteoalarmCountry::countries->{fullname} and ...:countries->{warnings}. I have no need to keep this values in the object.
And you are perfectly right it is also a good idea to check if $country_code is defined before assigning values to this key.