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}; }
In reply to Re^2: Modify the Object
by Your Mother
in thread Modify the Object
by sathish_cudd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |