Leont/libperl--

specifying taint mode breaks tests for local::lib

frankfranks opened this issue · 2 comments

The POD tests were skipped on my system. I was curious why, as I had Test::Pod installed. Turns out taint mod means $PERL5LIB gets ignored, and all my perl stuff lives in ~/perl5 thanks to local::lib.

Questionable if this is a bug or not, but here you go.

=== modified file 'inc/Library/Build/Test.pm'
--- inc/Library/Build/Test.pm 2011-04-28 01:57:56 +0000
+++ inc/Library/Build/Test.pm 2011-04-28 23:39:52 +0000
@@ -19,7 +19,7 @@
verbosity => $self->stash('verbose'),
exec => sub {
my (undef, $file) = @_;

  •           return -B $file ? [ $file ] : [ $^X, '-T', '-I' . catdir(qw/blib lib/), $file ];
    
  •           return -B $file ? [ $file ] : [ $^X, '-I' . catdir(qw/blib lib/), $file ];
        },
        merge => 1,
        color => -t STDOUT,
    

=== modified file 't/pod.t'
--- t/pod.t 2011-04-28 01:57:56 +0000
+++ t/pod.t 2011-04-28 23:37:34 +0000
@@ -1,5 +1,3 @@

-#!perl -T

use strict;
use warnings;
use Test::More;

I suspect there's a cleaner solution to this, but I need to dig deeper into TAP::Parser for that. On the long run Library::Build is going to end up as an evolutionary dead branch anyway, but that may take some time.

I accepted the patch, but still expect to rewrite this on the long term.