in reply to Style - how to give class method call as parameter
Well, I don't want to use named parameters for such a simple task.Why not? It's not like they're difficult to implement/use in Perl. You could even use a mix of positional (required) parameters and named (optional) parameters:
There's also the option of making it an optional positional parameter, but that tends to be a bad idea, due to things getting messy if you add more optional parameters down the road.my $success = $deployer->extend_order_lease( $order, $end_date, timeou +t => $timeout );
my $success = $deployer->extend_order_lease( $order, $end_date[, $time +out] );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Style - how to give class method call as parameter
by strat (Canon) on Jun 26, 2012 at 18:14 UTC |
In Section
Seekers of Perl Wisdom