in reply to How would you simplify this code?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How would you simplify this code?
by elTriberium (Friar) on Apr 07, 2011 at 05:48 UTC |