I redid the Makefile.PM to include DBI as a prerequesite and cleaned up and added some additional code to it from here:
https://metacpan.org/pod/DBI::DBD
These changes are in the new v0.23 release today.
If DBI.pm is not installed, perl Makefile.PL now produces (per the code from the link above):
Checking if your kit is complete...
Looks good
Warning: prerequisite DBI 1.03 not found.
Can't locate DBI.pm in @INC (you may need to install the DBI module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.0 /usr/local/share/perl/5.28.0 /usr/lib/x86_64-linux-gnu/perl-base) at Makefile.PL line 21.
Otherwise, things run as normal. I'm not sure if this is what you're expecting so please let me know if this is not quite right, along with what else needs to be done to resolve.
Jim
On Mon Dec 17 14:31:19 2018, SREZIC wrote:
Show quoted text> Automatic installation fails if DBI.pm is not installed:
>
> ...
> Output from '/opt/perl-5.28.1/bin/perl5.28.1 Makefile.PL':
>
> Can't locate DBI.pm in @INC (you may need to install the DBI module)
> (@INC contains: /var/tmp/cpansmoker-1023/2018121709/CPAN-Reporter-lib-
> ek69 /opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux /opt/perl-
> 5.28.1/lib/site_perl/5.28.1 /opt/perl-5.28.1/lib/5.28.1/x86_64-linux
> /opt/perl-5.28.1/lib/5.28.1 .) at Makefile.PL line 1.
> BEGIN failed--compilation aborted at Makefile.PL line 1.
> ...
>
> Another sample report at CPAN Testers:
>
http://www.cpantesters.org/cpan/report/a913f47a-d49a-11e5-bf8c-
> 42a1cfad5bc4
#use DBI 1.03;
#use DBI::DBD;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'DBD::LDAP',
'VERSION_FROM' => 'lib/DBD/LDAP.pm', # finds $VERSION
'INC' => '',
'dist' => {
'SUFFIX' => '.gz',
'COMPRESS' => 'gzip -9f'
},
'realclean' => {FILES => '*.xsi'},
'PREREQ_PM' => {
'DBI' => 1.03,
'Net::LDAP' => 0.01
},
'CONFIGURE' => sub {
eval {require DBI;};
if ($@) {
warn $@;
exit 0;
}
eval {require DBI::DBD;};
if ($@) {
warn $@;
exit 0;
}
my $dbi_arch_dir = DBI::DBD::dbd_dbi_arch_dir();
if (exists($opts{INC})) {
return {INC => "$opts{INC} -I$dbi_arch_dir"};
} else {
return {INC => "-I$dbi_arch_dir"};
}
}
);
package MY;
sub postamble { return DBI::DBD::dbd_postamble(@_); }
sub libscan {
my ($self, $path) = @_;
($path =~ /\~$/) ? undef : $path;
}