in reply to Re: Static Variables in Perl
in thread Static Variables in Perl
Minor tweak:
That way, Parent->knob() is an accessor, while Parent->knob(undef) is a mutator that sets the $knob to undef. Slightly better:$knob = $_[0] if @_;
but that's only if there are invalid values you want to block.if (@_) { # check that $_[0] is allowed. $knob = $_[0]; }
|
|---|