develooper Front page | perl.perl5.porters | Postings from February 2011

Re: First pass at Test::PerlRun

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
February 2, 2011 12:23
Subject:
Re: First pass at Test::PerlRun
Message ID:
20110202202254.GK24189@plum.flirble.org
On Sun, Jan 30, 2011 at 05:17:30PM -0600, Dave Rolsky wrote:
> I've attached a first pass at Test::PerlRun. The goal is to allow modules 
> that live under dist to use this instead of loading t/test.pl.
> 
> It has a little more sugar than perlrun() in test.pl, but it's pretty 
> basic.
> 
> Internally, it uses IPC::Run::run(), which should work on all platforms. I 
> borged the which_perl() sub from test.pl to determine the right perl 
> binary to use.
> 
> The module's POD is below my sig.
> 
> If this looks good, I can turn this into a proper patch to add this to 
> dist.

Looks sane, and I think a better job than I would have done myself.
However, I've not actually tried to convert anything to use it.

You've provided more *_is() and *_like functions than test.pl - is this a good
thing?

Also, dist/threads/t/exit.t wants to run something and both test the error
status and stdout - would it be viable to create a public perlrun() (or
somesuch) function which returns stdout, stderr and exit status [the latter
with the unfortunate hack that perlrun_exit_status_is() uses, until such
time as we can encourage IPC::Cmd to provide it cleanly]


As I think Jesse said on IRC, I also feel that the code from which_perl()
should have copyright attribution. git blame log says that it's
Schwern, Jarkko, Craig Berry, Paul Green, and me.

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About