[DBD-SQLite] DBD::SQLite and CPAN SOLVED
David Dooling
banjo at users.sourceforge.net
Fri Jun 19 21:30:25 GMT 2009
On Fri, Jun 19, 2009 at 01:26:24PM -0500, David Dooling wrote:
> On Fri, Jun 19, 2009 at 12:20:23PM -0600, Curtis Jewell wrote:
> > On Fri, 19 Jun 2009 18:45 +0100, "Ash Berlin" <ash_cpan at firemirror.com> wrote:
> > > On 19 Jun 2009, at 18:37, David Dooling wrote:
> > > > 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";
> > > > exit(0);
> > > > }
> > > >
> > > > 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).
>
> > > 2) Use the 'Are we running under a CPAN shell' from the (now improved)
> > > Module::Install::AutoInstall.
> >
> > Do this, too. It will catch what the previous one does not.
>
> I'll try this (although I am not entirely sure if it will help; the
> docs are a little light).
This worked. Changing from a series of requires to using -core
features allows you to specify a dependency order.
features (
-core => [
'DBI' => '1.601',
'DBD::SQLite' => '1.14',
...
],
...
);
Slightly more information can be found here
http://search.cpan.org/~autrijus/ExtUtils-AutoInstall-0.63/lib/ExtUtils/AutoInstall.pm
New version has been uploaded.
https://pause.perl.org/pub/PAUSE/authors/id/S/SA/SAKOHT/
--
David Dooling
http://www.politigenomics.com/
More information about the DBD-SQLite
mailing list