> > This would HAVE to be a very optional feature. I rely on undef
> > converting to a null string in many, many programs.
> 
> Surely in those programs you don't have -w turned on, because you wouldn't
> want to see all those warning messages.  So here is another idea: -w causes
> string interpolation of variable that evaluate to undef to be cancelled,
> leaving the variable name in place, as well as giving the warning.

I don't know about this. What if someone writes:

   print "You owe me $2, $name.\n";

With -w it'll print out the "correct" version?

   You owe me $2, Nate.

But without it it won't?

   You owe me , Nate.

As a beginning user, I'd be really confused. And then what if your
regexp accidentally matched, and you were relying on $2 to print out
verbatim?

   You owe me <maingly name="dangly">, Nate.

Seems really really scary, as does the #UNDEF# idea.

I think Nat's RFC 214 on getting more user-accurate error messages
should actually help solve this more than these approaches.

-Nate

Reply via email to