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

CPAN module like runperl() in t/

Thread Next
Dave Rolsky
January 30, 2011 08:58
CPAN module like runperl() in t/
Message ID:
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/, 
but I'm stuck on its use of the runperl() function from t/

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/

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.


Your guide to all that's veg      House Absolute(ly Pointless)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About