in reply to Re: Re: Re: Stringifying undefs
in thread Stringifying undefs

Dude, you've completely missed the point (again). No where did I propose making "0" and "undef" the same concept. All I want is to change the default STRINGIFICATION BEHAVIOUR of undef. Since you seem to be misunderstanding that, that means what happens when "undef" is interpolated inside a string. Currently when undef is interpolated inside a string it changes to ''. I want it to instead render as '0'. I'm not changing the fundamental concept of undef, just a display aspect of it.

Perhaps an example will illustrate my point. $u = URI->new('http://google.com'); $u is now a URI object. It's not a string containing a url, but when I interpolate it inside a string, it appears as a string containing a url. It's still a URI object, but it's rendered as a string.

As for breaking other modules, well, I have trouble believing that theres that many modules that test the stringification of undef if they wanted to test for undef, but even so, obviously the solution would have to be modular so it only applied to the current scope. use warnings; Would break far more code if it was indiscriminately applied to every module you used.