develooper Front page | perl.perl5.porters | Postings from December 2004

Re: [perl #33173] shellwords.pl and tainting

Thread Previous
From:
Alexey Tourbin
Date:
December 28, 2004 13:59
Subject:
Re: [perl #33173] shellwords.pl and tainting
Message ID:
20041228215548.GC7824@solemn.turbinal.org
On Tue, Dec 28, 2004 at 08:09:44PM +0000, Ton Hospel wrote:
> (in sub  old_shellwords)
> > -    local($_) =3D join('', @_);
> > -    my(@words,$snippet,$field);
> > +    no warnings 'uninitialized';	# we will be testing undef strings
> 
> Where would undef strings ever appear ? Except of course for the join of 
> @_ if that has undef elements, or the $_ default case if that's undef.
> And in these cases I'd prefer getting the warnings.

This is analogous to `sub parse_line' which had `no warnings' at all;
I changed this to `no warnings 'uninitialized'' for clarity.  I am not
quite sure whether or not these routines should emit warnings.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About