If one deploys a sub with optional-positional parameters,
one can't add a required parameter later without breaking
any existing calls that make use of any o-p parameters.
Right?

A6: "An rw parameter may only default to a valid lvalue. If
you find yourself wanting it to default to an ordinary value
because it's undefined, perhaps you really want //= instead:"

Wouldn't it make sense to allow //= in the sig and have it dwim?

A6: "All unbound named arguments are bound to elements of
the slurpy hash, if one was declared.  If no slurpy hash is
declared, an exception is thrown (although some standard
methods, like BUILD, will provide an implicitly declared
slurpy hash--known as %_ by analogy to @_--to handle surplus
named arguments)."

What about there always being an implied %_ and @_, but if
either get entries, perl generates a warning (unless it's
one of the methods like BUILD)?

A6: "It's also possible to transition directly from positional
arguments to the variadic list if optional positional
arguments have been completely specified."

Or if one uses pipes, right?

--
ralph

Reply via email to