Re: Conversion of undef() to string user overridable for easy debugging

2000-09-14 Thread Steve Fink
> > This reminds me of a related but rather opposite desire I have had > > more than once: a quotish context that would be otherwise like q() but > > with some minimal extra typing I could mark a scalar or an array to be > > expanded as in qq(). > > I have wanted that also, although I don't remem

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Glenn Linderman
Nathan Wiger wrote: > 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? With a warning, because $2 isn't defined. >You owe me $2, Nate. > > But without it it won't? > >You owe me , Nate. You turn

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Nathan Wiger
> > 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 interpol

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Glenn Linderman
Eric Roode wrote: > >Imagine that you could easily override the conversion of undef() into a > >string, so that when stringified it returns something like "#UNDEF#" > >instead of just an empty string. That would make debugging far more > >easy: take a look at the output, and search for this senti

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Eric Roode
>Imagine that you could easily override the conversion of undef() into a >string, so that when stringified it returns something like "#UNDEF#" >instead of just an empty string. That would make debugging far more >easy: take a look at the output, and search for this sentinel string. This would HAV

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Brad Hughes
Mark-Jason Dominus wrote: > > > This reminds me of a related but rather opposite desire I have had > > more than once: a quotish context that would be otherwise like q() but > > with some minimal extra typing I could mark a scalar or an array to be > > expanded as in qq(). > > I have wanted that

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Bart Lateur
On Wed, 13 Sep 2000 13:56:53 -0700, Peter Scott wrote: >I would rather solve this by requiring that Perl identify the thing that >was undef than what you propose below. Surely it can't be that hard. Fine by me. Only, AFAIK, Perl is only aware of "values", not of "variables". -- Bart

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Mark-Jason Dominus
> This reminds me of a related but rather opposite desire I have had > more than once: a quotish context that would be otherwise like q() but > with some minimal extra typing I could mark a scalar or an array to be > expanded as in qq(). I have wanted that also, although I don't remember why ju

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Peter Scott
At 10:49 PM 9/13/00 +0200, Bart Lateur wrote: >Imagine the following scenario: your script contains a doiuble-quotish >40 line here-doc, with a bunch of variables in it. Unforetunately, you >forgot to set one, and you get the not so helpful complaint: > > use of unitialized value at line x

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Jarkko Hietaniemi
On Wed, Sep 13, 2000 at 10:49:41PM +0200, Bart Lateur wrote: > Imagine the following scenario: your script contains a doiuble-quotish > 40 line here-doc, with a bunch of variables in it. Unforetunately, you > forgot to set one, and you get the not so helpful complaint: > > use of unitialize

Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Bart Lateur
Imagine the following scenario: your script contains a doiuble-quotish 40 line here-doc, with a bunch of variables in it. Unforetunately, you forgot to set one, and you get the not so helpful complaint: use of unitialized value at line xxx where xxx is the line number for the line that c