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

CPAN module like runperl() in t/test.pl?

Thread Next
From:
Dave Rolsky
Date:
January 30, 2011 08:58
Subject:
CPAN module like runperl() in t/test.pl?
Message ID:
alpine.DEB.2.00.1101301047100.13725@urth.org
I'm working on moving Carp over to dist and making it dual-lifeable.

I am converting the test suite over to Test::More instead of t/test.pl, 
but I'm stuck on its use of the runperl() function from t/test.pl.

For those who don't know, this function reinvokes the perl interpreter 
with a code snippet and gives you back the output. It goes through great 
lengths to ensure cross-platform-ness.

So is there a CPAN module that we could dual-life that does this (and 
probably _just_ this)?

Here's some thing on CPAN I've looked at:

Test::Cmd - old, weird, code (Test::Cmd ISA File::Spec (isa wtf)) and it 
doesn't play nice with Test::Builder

Test::Command - this has exactly what I need for the Carp tests 
(exit_is_num() function) but it also has a lot more. It actually looks 
very useful, but it doesn't have all the cross-platform exactitude of 
runperl in t/test.pl

I don't think either one of these really does the trick, unfortunately.

I'd be happy to move/copy the relevant code into a small Test::RunPerl 
module that lives in the Perl core under dist if that's the answer.

This would be useful for other modules that we want to dual-life too.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

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