Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: How can I keep object arguments private

by walto (Pilgrim)
on May 23, 2010 at 17:45 UTC ( #841273=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://841273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2021-01-18 01:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?