in reply to Complexity of API argument passing
My gut feeling is something like DBI->connect uses now:
Pass required parameters as scalars, and all optional params as hash, with prototype sub foo($$;%).
Optional 3rd parameter will be bundled in hash with some meaningful name.
This way, you have best of both words: only one function name to remember, and easy way to pass any combination of valid parameters.
Does it make sense? Just my $0.02.
pmas
To make errors is human. But to make million errors per second, you need a computer.
|
|---|