[DBD-SQLite] DBD::SQLite and CPAN

David Dooling banjo at users.sourceforge.net
Fri Jun 19 17:37:57 GMT 2009

I am trying to clean up the prerequisites for a package that requires
both DBI and DBD::SQLite (UR).  CPAN wants to order the prerequisites
in alphabetical order, so it tries to install DBD::SQLite first.  It
comes to this part of the DBD::SQLite Makefile.PL code

  # Because DBI generates a postamble at configure-time, we need
  # the required version of DBI very early.
  my $DBI_required = 1.57;
  eval {
          require DBI;
  if ( $@ or DBI->VERSION < $DBI_required ) {
          print "DBI 1.57 is required to configure this module, please install it or upgrade your CPAN/CPANPLUS shell\n";

and fails (although the exit status is zero) because an older version
of DBI is installed.  Even though DBI later appears and as PREREQ_PM
in the WriteMakefile call, that line never gets executed, the Makefile
never gets created, and CPAN will go no further with the DBD::SQLite
install. CPAN does continue to try to install other modules,
ultimately failing the requested install because DBD::SQLite is
missing (or too old).

I am not sure what the issue around the DBI postamble is so I am not
sure how to fix this so DBD::SQLite to play nicely with CPAN.  Any
ideas/guidance on how to get this to behave as one might expect?

David Dooling

More information about the DBD-SQLite mailing list