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

Re: [perl #33173] and tainting

Thread Previous
Alexey Tourbin
December 28, 2004 13:59
Re: [perl #33173] and tainting
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About