Yitzchak Scott-Thoennes wrote:
> 
> How do you feel about this:
> 
> --- perl/av.c.orig      2005-06-02 01:07:41.000000000 -0700
> +++ perl/av.c   2005-06-06 02:05:04.853572800 -0700
> @@ -927,8 +927,8 @@ Perl_av_exists(pTHX_ AV *av, I32 key)
>             return FALSE;
>      }
>  
> -    if (key <= AvFILLp(av) && AvARRAY(av)[key] != &PL_sv_undef
> -       && AvARRAY(av)[key])
> +    if (key <= AvFILLp(av) && AvARRAY(av)[key]
> +        && (AvARRAY(av)[key] != &PL_sv_undef || ! AvREAL(av)))
>      {
>         return TRUE;
>      }
> 
> which should make exists true for any parameter actually passed, so
> long as @_ isn't reified.

I don't like it. It doesn't solve the whole problem but only reduces
the set of cases where weird behaviour is observed, making this weird
behaviour perhaps more obscure and less predictable.

Reply via email to