Subject: | problem in Filters.pm |
Using CPAN to install Inline::Filters results in an error in one of the tests.
Show quoted text
cpan> install Inline::Filters
Running install for module Inline::Filters
Running make for N/NE/NEILW/Inline-Filters-0.12.tar.gz
Is already unwrapped into directory /root/.cpan/build/Inline-Filters-0.12
Has already been processed within this session
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/Preprocess........Can't use string ("-I/root/.cpan/build/Inline-Filte") as an
ARRAY ref while "strict refs" in use at /root/.cpan/build/Inline-Filters-0.12/blib/lib/Inline/Filters.pm line 103.
BEGIN failed--compilation aborted at t/Preprocess.t line 16.
t/Preprocess........dubious
Test returned status 25 (wstat 6400, 0x1900)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
t/Strip_Comments....ok
t/Strip_POD.........ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/Preprocess.t 25 6400 1 1 100.00% 1
Failed 1/3 test scripts, 66.67% okay. 1/5 subtests failed, 80.00% okay.
make: *** [test_dynamic] Error 29
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
Looking at the Filters.pm, we can change
sub Preprocess {
my $ilsm = shift;
my $code = shift;
my $cpp = join ' ', ($Config{cpprun},
$Config{cppflags},
"-I$Config{archlibexp}/CORE",
@{$ilsm->{ILSM}{MAKEFILE}{INC}||[]}
);
to
sub Preprocess {
no strict "refs";
my $ilsm = shift;
my $code = shift;
my $cpp = join ' ', ($Config{cpprun},
$Config{cppflags},
"-I$Config{archlibexp}/CORE",
@{$ilsm->{ILSM}{MAKEFILE}{INC}||[]}
);
and the module then installs correctly (passing the tests).