From: "Rob Dixon" <[EMAIL PROTECTED]>
> Jenda Krynicky wrote:
> > From: "Rob Dixon" <[EMAIL PROTECTED]>
> > >
> > > Don't put \n on the end of a die string, otherwise the Perl
> > > interpreter won't tell you the line number of the failure.
> >
> > Well it's good to know you'll get the line number and source file
> > name if you omit the newline, but ... most often you do not want it
> > there. What would you think of a program that responds to you with
> >
> > Cannot find file Foo.txt at script.pl line 26.
> >
> > ? Looks like the programm crashed, not that it just compains that
> > the user entered an incorrect filename. If it's a message that's
> > supposed to be seen by lusers you most probably do not want the
> > source info appended.
> 
> Jenda, surely you appreciate that this is not a production program?
> Even if it were ever to be one, which I doubt, it is at present being
> debugged of the most basic problems. At this stage the cosmetic
> appearance of a warning message cannot surely be more important than
> how much it assists the development process? 

If the program is fairly short then it's very likely that the message 
itself is enough to find out where is it printed.

But of course in this case it's not really important.
I still tend to NOT let Perl include the line number if I intend the 
message to get printed to the user. Even during development. I'd 
definitely forget to add the \n before the code gets to production.
Besides we all know the development never ends.

But this is very subjective :-)

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to