See Original text in context
method sigil(Parameter: --> Str)
Returns a string containing the parameter's sigil, for a looser definition of "sigil" than what is considered part of the parameter's name
. Still returns a sigil even if the parameter is anonymous.
This "sigil" is actually an introspection used to help determine the normal binding style of a parameter, if it has not been altered through a trait.
Sigil | Will bind to | Default behavior |
---|---|---|
$ | Scalar | Generate new Scalar, use instead of Scalar in argument, if any |
@ | Positional | Bind directly to the argument |
@ | PositionalBindFailover | If binding failed, call argument's .cache method, bind to result |
% | Associative | Bind directly to the argument |
& | Callable | Bind directly to the argument |
\ | (anything) | Bind directly to the argument, keep existing Scalar, if any |
Also, |
will bind to all remaining arguments and make new Capture
if needed.