Tom Christiansen wrote:
>
> >The warning message "use of uninitialized value" should also
> >disappear, to be replaced with "use of undefined value", and the
> >warning for the purpose described in this RFC should be "use of
> >uninitialized variable C<$x>".
>
> What about if there's only an expr, not a variable?
>
> For example:
>
> print $$x->methop()
>
> If the return list of the object whose ref ref is in $x is (a, undef, b),
> what are you supposed to say?
>
> --tom
"use of undefined value". You misunderstand; I am *not* addressing the
perennial complaint that the "use of uninitialized value" doesn't
identify the source of the undefined value. The only reason why I
mentioned that warning is because it sounds too similar to the warning
I'd be adding, so I renamed the existing warning to better reflect what
it means. (And that's not a new proposal either -- didn't you suggest
that once?) So, roughly
"symbol $main::x used only once" -> "use of uninitialized variable
$main::x"
"use of uninitialized value" -> "use of undefined value"
except that the semantics of the first are slightly different. I'm not
touching the second other than to reword it to be more accurate.
Personally, I think that it ought to be possible to provide more
information there in limited cases, but that's for another RFC that I
don't care enough about to write.
I'll rephrase the RFC to make this more clear. On rereading it, it does
sound like I'm implying changing the undef warning.