Skip Menu |

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

Report information
The Basics
Id: 30678
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: andy [...] hexten.net
Requestors: wilburlo [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.00
Fixed in: (no value)



Thank you for producing TAP::Harness! I found a bug in the documentation. The documentation states that TAP::Harness->new ( { exec => ... } ) may be used as such: exec => '/usr/bin/ruby -w' However, when I attempted this, I found that the code will coerce $exec into an array reference at kitty:~/volunteer/tap> perl test.pl Can't use string ("/usr/bin/perl") as an ARRAY ref while "strict refs" in use at /usr/local/share/perl/5.8.8/TAP/Harness.pm line 517. 516: if ( my $exec = $self->exec ) { 517==> $args{exec} = [ @$exec, $test ]; 518 } Regards, -daniel Here is the sample code #### test.pl #!/usr/bin/env perl use strict; use warnings; use English; # $EXECUTABLE_NAME ( aka $^X ) use TAP::Harness; my $args = { exec => $EXECUTABLE_NAME }; my $test = TAP::Harness->new( $args ); my $aggregator = $test->runtests( '01-test.pl' ); print $aggregator->failed(), "\n"; ### 01-test.pl use Test::More qw | no_plan |; ok ( 1, 'basic test');
Subject: exec documentation needs updating
From: wilburlo [...] gmail.com
On further investigation I found that the proper argument string is exec => [ $program, "argument1", "argument2", ... ], TIA, -daniel Show quoted text
> I found a bug in the documentation. > > The documentation states that TAP::Harness->new ( { exec => ... } ) may > be used as such: > > exec => '/usr/bin/ruby -w' >
You're quite right, thanks. This is fixed in 3.02 which will be released in a couple of days.