But even that's a pain in the arse too. So, Class::Accessor for the win.sub accountnumber { my ($self, $num) = @_; if (defined($num)) { $self->{account_num} = $num; return $self; } else { return $self->{account_num}; } }
use base qw(Class::Accessor); __PACKAGE__->mk_accessors(qw(accountnumber));
In reply to Re: "Fields" for "Objects"
by vek
in thread "Fields" for "Objects"
by zerohero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |