in reply to Re: Format Style Opinions: my, ternary, subroutine
in thread Format / Logical Expression / Style Opinions: my, ternary, subroutine, @_
friedo wrote:
> ...consider thinking about why you have a sub where the first parameter is optional...
Because it is a wrapper for a command. Suppose the command was ls. It would be convenient to call the sub, thus:
ls('-lrt', '/home');
Does this convenience not outweigh breaking from the convention that optional args go last?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Format Style Opinions: my, ternary, subroutine
by webfiend (Vicar) on Dec 04, 2007 at 19:11 UTC |