[647] Avoid "Use of uninitialized value in join"
Michael G Schwern
schwern at pobox.com
Tue Oct 2 01:27:07 BST 2007
andy at hexten.net wrote:
> Revision: 647
> Author: andy
> Date: 2007-10-01 02:01:54 +0100 (Mon, 01 Oct 2007)
>
> Log Message:
> -----------
> Avoid "Use of uninitialized value in join"
>
> Modified Paths:
> --------------
> trunk/t/taint.t
Probably an oversight this time, but I'd like to request that code changes and
code tidying be done in separate commits. Mixed together it makes it hard to
see the significant changes in the diff.
> Modified: trunk/t/taint.t
> ===================================================================
> --- trunk/t/taint.t 2007-09-30 22:02:11 UTC (rev 646)
> +++ trunk/t/taint.t 2007-10-01 01:01:54 UTC (rev 647)
> @@ -3,7 +3,6 @@
> # Test that options in PERL5LIB and PERL5OPT are propogated to tainted
> # tests
>
> -
> use strict;
> use lib 't/lib';
>
> @@ -13,24 +12,24 @@
> use TAP::Parser;
>
> sub run_test_file {
> - my($test_template, @args) = @_;
> -
> + my ( $test_template, @args ) = @_;
> +
> my $test_file = 't/temp_test.tmp';
> -
> +
> open TEST, ">$test_file" or die $!;
> printf TEST $test_template, @args;
> close TEST;
>
> - my $p = TAP::Parser->new({ source => $test_file });
> + my $p = TAP::Parser->new( { source => $test_file } );
> 1 while $p->next;
> ok !$p->failed;
> -
> +
> unlink $test_file;
> }
>
> -
> {
> - local $ENV{PERL5LIB} = join $Config{path_sep}, 'wibble', $ENV{PERL5LIB};
> + local $ENV{PERL5LIB} = join $Config{path_sep}, grep defined, 'wibble',
> + $ENV{PERL5LIB};
> run_test_file(<<'END');
> #!/usr/bin/perl -T
>
> @@ -40,11 +39,11 @@
> END
> }
>
> -
> {
> my $perl5lib = $ENV{PERL5LIB};
> local $ENV{PERL5LIB};
> - local $ENV{PERLLIB} = join $Config{path_sep}, 'wibble', $perl5lib;
> + local $ENV{PERLLIB} = join $Config{path_sep}, grep defined, 'wibble',
> + $perl5lib;
> run_test_file(<<'END');
> #!/usr/bin/perl -T
>
> @@ -54,7 +53,6 @@
> END
> }
>
> -
> {
> local $ENV{PERL5OPT} = '-Mstrict';
> run_test_file(<<'END');
>
>
> _______________________________________________
> tapx-commit mailing list
> tapx-commit at hexten.net
> http://hexten.net/mailman/listinfo/tapx-commit
>
--
Stabbing you in the face so you don't have to.
More information about the tapx-dev
mailing list