diff options
author | Steve Peters <steve@fisharerojo.org> | 2008-02-11 16:58:15 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2008-02-11 16:58:15 +0000 |
commit | bd3ac2f12cba77166be594b81078e173bcfc2b31 (patch) | |
tree | 389aabefb61a92bb82a1a79af6f12c6016c14662 /lib/Test/Harness.pm | |
parent | 22ccb26d0b431d84f26a40d616613b1100362a43 (diff) | |
download | perl-bd3ac2f12cba77166be594b81078e173bcfc2b31.tar.gz |
Upgrade to Test-Harness-3.09
p4raw-id: //depot/perl@33281
Diffstat (limited to 'lib/Test/Harness.pm')
-rw-r--r-- | lib/Test/Harness.pm | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index 77814e462f..14af275db3 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -11,6 +11,8 @@ use TAP::Harness (); use TAP::Parser::Aggregator (); use TAP::Parser::Source::Perl (); +use TAP::Parser::Utils qw( split_shell ); + use Config; use Exporter; @@ -41,11 +43,11 @@ Test::Harness - Run Perl standard test scripts with statistics =head1 VERSION -Version 3.08 +Version 3.09 =cut -$VERSION = '3.08'; +$VERSION = '3.09'; # Backwards compatibility for exportable variable names. *verbose = *Verbose; @@ -93,7 +95,8 @@ pluggable 'Straps' interface that previous versions of L<Test::Harness> supported is not reproduced here. Straps is now available as a stand alone module: L<Test::Harness::Straps>. -See L<TAP::Parser> for the main documentation for this distribution. +See L<TAP::Parser>, L<TAP::Harness> for the main documentation for this +distribution. =head1 FUNCTIONS @@ -221,14 +224,10 @@ sub _canon { sub _new_harness { my $sub_args = shift || {}; - if ( defined( my $env_sw = $ENV{HARNESS_PERL_SWITCHES} ) ) { - $Switches .= ' ' . $env_sw if ( length($env_sw) ); - } - - # This is a bit crufty. The switches have all been joined into a - # single string so we have to try and recover them. my ( @lib, @switches ); - for my $opt ( split( /\s+(?=-)/, $Switches ) ) { + for my $opt ( + split_shell( $Switches, $ENV{HARNESS_PERL_SWITCHES} ) ) + { if ( $opt =~ /^ -I (.*) $ /x ) { push @lib, $1; } @@ -556,6 +555,17 @@ Multiple options may be separated by colons: =back +=head1 Taint Mode + +Normally when a Perl program is run in taint mode the contents of the +C<PERL5LIB> environment variable do not appear in C<@INC>. + +Because C<PERL5LIB> is often used during testing to add build +directories to C<@INC> C<Test::Harness> (actually +L<TAP::Parser::Source::Perl>) passes the names of any directories found +in C<PERL5LIB> as -I switches. The net effect of this is that +C<PERL5LIB> is honoured even in taint mode. + =head1 SEE ALSO L<TAP::Harness> @@ -572,7 +582,8 @@ as I make changes. Andy Armstrong C<< <andy@hexten.net> >> -L<Test::Harness> (on which this module is based) has this attribution: +L<Test::Harness> 2.64 (maintained by Andy Lester and on which this +module is based) has this attribution: Either Tim Bunce or Andreas Koenig, we don't know. What we know for sure is, that it was inspired by Larry Wall's F<TEST> script that came |