Package: libtest-compile-perl Version: 0.13-1 Severity: important Tags: patch upstream
The line in pl_file_ok that runs the file in compile only mode needs to include a '-Iblib/lib'. I have a patch that effects this and includes a test. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libtest-compile-perl depends on: ii libuniversal-require-perl 0.13-1 Load modules from a variable ii perl 5.12.4-6 Larry Wall's Practical Extraction libtest-compile-perl recommends no packages. libtest-compile-perl suggests no packages. -- no debconf information
--- /dev/null +++ b/t/scripts/lib.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl + +BEGIN { + require strict; + require warnings; + require Test::Builder; + require File::Spec; + require UNIVERSAL::require; + @INC = grep { $_ eq 'blib/lib' } @INC; +} +use Test::Compile; + +sleep 1; --- /dev/null +++ b/t/11.lib.t @@ -0,0 +1,7 @@ +#!perl -w +use strict; +use warnings; +use Test::More tests => 1; +use Test::Compile; +pl_file_ok('t/scripts/lib.pl', 'lib.pl compiles'); + --- a/lib/Test/Compile.pm +++ b/lib/Test/Compile.pm @@ -72,7 +72,7 @@ return; } my $taint = _is_in_taint_mode($file); - my $out = `$^X -cw$taint $file 2>&1`; + my $out = `$^X -cw$taint -Iblib/lib $file 2>&1`; if ($?) { $Test->ok(0, 'Script does not compile'); $Test->diag($out);