From: Darin McBride <[EMAIL PROTECTED]>
> Richard Heintze wrote:
> > I have just discovered the the following code causes
> > trouble when I have "use strict" and "use warn";
> > 
> > use strict;
> > use warnings;
> > 
> > my $k = $q->param('xyz');
> > print qq[ \$k = $k ];
> > 
> > The problem is that if there is no GET/POST param
> > called xyz, we are concatenating with a null value
> > Is there a way I can suppress only concatenation
> > warnings? I did perldoc strict and perldoc warnings
> > and could not determine if the supression I want is
> > possible.
> 
> Suppression only serves to hide problems rather than fix them.

Well in this case the warning is the problem.

I do not remember any single case when this warning helped me to 
uncover and fix a bug in my code. As you show below it just forces 
you to write code that's hard to read.

If I want to treat undef specialy at some place I may do so, other 
than that I'm fine with undef being silently stringified to an empty 
string or converted to zero.

Of course this is more a matter of personal taste than anything else.

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