Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 74443
Status: new
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.23
Fixed in: (no value)



Subject: [PATCH] prove --exec handling quotes etc.
Currently it's not possible to specify something like prove --exec 'command "foo bar"' ... because the splitting for --exec option just works on whitespace and does not obey shell quoting rules. The attached patch fixes this by using TAP::Parser::Utils::split_shell instead of perl's split. Regards, Slaven
Subject: th.diff
diff --git c/lib/App/Prove.pm w/lib/App/Prove.pm index 344cbb5..7b6eab6 100644 --- c/lib/App/Prove.pm +++ w/lib/App/Prove.pm @@ -366,7 +366,7 @@ sub _get_args { $args{errors} = 1 if $self->parse; # defined but zero-length exec runs test files as binaries - $args{exec} = [ split( /\s+/, $self->exec ) ] + $args{exec} = [ split_shell( $self->exec ) ] if ( defined( $self->exec ) ); $args{version} = $self->tapversion if defined( $self->tapversion ); diff --git c/lib/TAP/Parser/Utils.pm w/lib/TAP/Parser/Utils.pm index db12bf1..76364a0 100644 --- c/lib/TAP/Parser/Utils.pm +++ w/lib/TAP/Parser/Utils.pm @@ -44,7 +44,8 @@ which case an empty array will be returned. That makes it possible to without worrying about whether the environment variable exists. -This is used to split HARNESS_PERL_ARGS into individual switches. +This is used to split HARNESS_PERL_ARGS into individual switches and +to handle prove's C<--exec> option. =cut