Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Modify the Object

by Your Mother (Chancellor)
on Oct 02, 2012 at 17:06 UTC ( #996882=note: print w/ replies, xml ) Need Help??


in reply to Re: Modify the Object
in thread Modify the Object

Your amendment is fine but I prefer the idiom tobyink showed. It's terse and lends itself to simple flow validation–

# use Carp; sub access_A { my $self = shift; $self->{A} = shift if @_; croak "Too many arguments to access_A" if @_; $self->{A}; }


Comment on Re^2: Modify the Object
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (19)
As of 2015-07-28 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls