Subject: | Modules in custom library paths are not found |
If a custom library path is added in Build.PL via a 'use lib' statement, Module::Build will add it to the list of directories in @INC in the generated Build script.
However, Test::Prereq::Build does not check the @INC directories as defined in Build and thus cannot find modules that are included with a distribution rather than installed on the local machine.
More importantly, prereq_ok returns a status of 1 which is wrong. I have attached an output that demonstrates this problem.
Thanks,
William
william@zeus:~/perl/Knowmad-Mailform$ perl -Mblib -Iperl5 t/008_prereq.t
1..1
B::Module::Info,modules_used use failed with 2 saying:
Can't locate Text/Bind.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.3 /usr/local/share/perl/5.8.3 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 .) at /home/william/perl/Knowmad-Mailform/blib/lib/Knowmad/Mailform.pm line 53.
BEGIN failed--compilation aborted at /home/william/perl/Knowmad-Mailform/blib/lib/Knowmad/Mailform.pm line 53.
require not bare 5.006 at line 47
use strict () at "/home/william/perl/Knowmad-Mailform/blib/lib/Knowmad/Mailform.pm" line 48
use base () at "/home/william/perl/Knowmad-Mailform/blib/lib/Knowmad/Mailform.pm" line 50
use Text::Bind () at "/home/william/perl/Knowmad-Mailform/blib/lib/Knowmad/Mailform.pm" line 53
B::Module::Info,modules_used use failed with 2 saying:
Can't locate Business/PayPal.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.3 /usr/local/share/perl/5.8.3 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 .) at /home/william/perl/Knowmad-Mailform/t/020_paypal.t line 7.
BEGIN failed--compilation aborted at /home/william/perl/Knowmad-Mailform/t/020_paypal.t line 7.
use Test::More () at "/home/william/perl/Knowmad-Mailform/t/020_paypal.t" line 5
use Data::Dumper () at "/home/william/perl/Knowmad-Mailform/t/020_paypal.t" line 6
use Business::PayPal () at "/home/william/perl/Knowmad-Mailform/t/020_paypal.t" line 7
ok 1 - Prereq test