When installing package A in CPAN, and finding that package B is also required,
dh-make-perl will then install package B in CPAN. The trouble is that package B
is not shared to package A when it finally gets to testing for package A. If
package B does not exist within @INC (ie: the package hasn't been installed in
the core directories), the testing will likely croak with messages like this:
t/01use.t .......... 1/1
# Failed test 'use Package::A;'
# at t/01use.t line 3.
# Tried to use 'Package::A'.
# Error: Can't locate Package/B.pm in @INC (@INC contains: /usr/share/dh-make-perl/Package-A-0.10/inc /usr/share/dh-make-perl/Package-A-0.10/blib/lib /usr/share/dh-make-perl/Package-A-0.10/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/share/dh-make-perl/Package-A-0.10/blib/lib/Package/A.pm line 7.
# BEGIN failed--compilation aborted at /usr/share/dh-make-perl/Package-A-0.10/blib/lib/Package/A.pm line 7.
# Compilation failed in require at (eval 4) line 2.
# BEGIN failed--compilation aborted at (eval 4) line 2.
# Looks like you failed 1 test of 1.
The workaround is to, of course, install the dependency manually via CPAN, but
this pollutes the core directories with non-Debian files, and defeats the
purpose of dh-make-perl in general.