On Thu Nov 15 21:04:31 2012, XENO wrote:
Show quoted text> is there any chance you could make Test::Script work with just the
> normal lib? like perl -Ilib or prove -lv? this way one could use
> Test::Script without having a fully build dist.
>
> --
> Caleb Cushing
>
>
http://xenoterracide.com
I just commented in rt102743 which is a dupe of this, but I have a proposed patch that should resolve this
diff --git a/lib/Test/Script.pm b/lib/Test/Script.pm
index 734afec..3634c90 100755
--- a/lib/Test/Script.pm
+++ b/lib/Test/Script.pm
@@ -113,7 +113,8 @@ sub script_compiles {
my $args = _script(shift);
my $unix = shift @$args;
my $path = path( $unix );
- my $cmd = [ perl, '-Mblib', '-c', $path, @$args ];
+ my @libs = map { "-I$_" } grep {!ref($_)} @INC;
+ my $cmd = [ perl, @libs, '-c', $path, @$args ];
my $stdin = '';
my $stdout = '';
my $stderr = '';
@@ -153,7 +154,8 @@ sub script_runs {
my $args = _script(shift);
my $unix = shift @$args;
my $path = path( $unix );
- my $cmd = [ perl, '-Mblib', $path, @$args ];
+ my @libs = map { "-I$_" } grep {!ref($_)} @INC;
+ my $cmd = [ perl, @libs, $path, @$args ];
my $stdin = '';
my $stdout = '';
my $stderr = '';