in reply to Re: Concatnate long statement
in thread Concatnate long statement
And if not refactor, at least switch to using pseudo-named arguments by expecting key/value pairs and appending those to defaults.
sub womble { my @defaults = ( fleem => 12.3, alarm_low => 99, alarm_hi => 'naked ernest borgnine', alarm_hello => 'nice to see you', alarm_good_evening => STOP_STEALING_PYTHON_GAGS, quux => 19.95, ); my %args = ( @defaults, @_ ); if( $args{ quux } > 15 ) { enable_flux_capacitor(); } ## ... rest of womblification routine } womble( quux => 1.21 * GIGAWATS_PER_MICROFLEEM, alarm_low => 42, );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Concatnate long statement
by fenLisesi (Priest) on Jul 04, 2007 at 07:27 UTC |