Just use "$self-><Varname>" instead of the lexically defined var names for the rest of the sub.$args($_) ? $self->$_($args{$_}) : $self->$_ or die "Missing variable + $_" for qw|resource username|;
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
In reply to Re: How would you simplify this code?
by NetWallah
in thread How would you simplify this code?
by elTriberium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |