> but in the case of
>
> sub demo ($name, %options) {...}
>
> what does
>
> demo($var, name => $value);
>
> do ?
Named parameters are processed first, and any remaining parameters
then assigned. So $name gets $value and %options gets $var (which
generates an "Odd number of elements in hash assignment" warning.
And you also get a warning about the dangers of mixing named and
unnamed parameters. Just say "No!".
Damian
- Re: RFC 84 (v1) Replace => (stringifying co... Peter Scott
- Re: RFC 84 (v1) Replace => (stringifyin... Glenn Linderman
- Re: RFC 84 (v1) Replace => (stringi... Randal L. Schwartz
- Re: RFC 84 (v1) Replace => (stringifyin... Nick Ing-Simmons
- Re: RFC 84 (v1) Replace => (stringifying co... Jeremy Howard
- Re: RFC 84 (v1) Replace => (stringifying co... Bart Lateur
- Re: RFC 84 (v1) Replace => (stringifyin... Simply Hao
- Re: RFC 84 (v1) Replace => (stringi... Bart Lateur
- Re: RFC 84 (v1) Replace => (stringifying comma)... Graham Barr
- Re: RFC 84 (v1) Replace => (stringifying co... Clayton Scott
- Re: RFC 84 (v1) Replace => (stringifying comma)... Damian Conway
- Re: RFC 84 (v1) Replace => (stringifying comma) with... Hildo Biersma
- Re: RFC 84 (v1) Replace => (stringifying comma)... Nathan Wiger
- Re: RFC 84 (v1) Replace => (stringifying comma) with... Graham Barr
- Re: RFC 84 (v1) Replace => (stringifying comma) with... Bart Lateur
- Re: RFC 84 (v1) Replace => (stringifying comma) with... Damian Conway
- Re: RFC 84 (v1) Replace => (stringifying comma) with... Damian Conway
- Re: RFC 84 (v1) Replace => (stringifying comma) with... Damian Conway
- Re: RFC 84 (v1) Replace => (stringifying comma) with... John Porter
