From: Peter Rabbitson Date: Tue, 31 Aug 2010 14:44:35 +0000 (+0200) Subject: Don't try to load DBIx::Class during the Makefile.PL stage, just X-Git-Tag: v0.08124~89 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ccebe1f11c68b097a0446853b9c39a5af9cf8403;p=dbsrgits%2FDBIx-Class.git Don't try to load DBIx::Class during the Makefile.PL stage, just to detemrine its version --- diff --git a/Changes b/Changes index 8037e66..be94692 100644 --- a/Changes +++ b/Changes @@ -42,6 +42,8 @@ Revision history for DBIx::Class - Do not execute t/zzzzzzz_sqlite_deadlock.t for regular module installs - test is prone to spontaneous blow up - DT-related tests now require a DateTime >= 0.55 (RT#60324) + - Makefile.PL now provides a pre-parsed DBIC version to the + Opt::Dep pod generator 0.08123 2010-06-12 14:46 (UTC) * Fixes diff --git a/Makefile.PL b/Makefile.PL index ce27a84..40806a1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -157,7 +157,7 @@ if ($Module::Install::AUTHOR) { print "Regenerating Optional/Dependencies.pod\n"; require DBIx::Class::Optional::Dependencies; - DBIx::Class::Optional::Dependencies->_gen_pod; + DBIx::Class::Optional::Dependencies->_gen_pod (Meta->version); # FIXME Disabled due to unsolved issues, ask theorbtwo # require Module::Install::Pod::Inherit; diff --git a/lib/DBIx/Class/Optional/Dependencies.pm b/lib/DBIx/Class/Optional/Dependencies.pm index 65994bf..8af7050 100644 --- a/lib/DBIx/Class/Optional/Dependencies.pm +++ b/lib/DBIx/Class/Optional/Dependencies.pm @@ -302,27 +302,23 @@ sub req_group_list { # This is to be called by the author only (automatically in Makefile.PL) sub _gen_pod { + my ($class, $distver) = @_; - my $class = shift; my $modfn = __PACKAGE__ . '.pm'; $modfn =~ s/\:\:/\//g; my $podfn = __FILE__; $podfn =~ s/\.pm$/\.pod/; - my $distver = + $distver ||= eval { require DBIx::Class; DBIx::Class->VERSION; } || - do { - warn + die "\n\n---------------------------------------------------------------------\n" . 'Unable to load core DBIx::Class module to determine current version, '. 'possibly due to missing dependencies. Author-mode autodocumentation ' . "halted\n\n" . $@ . "\n\n---------------------------------------------------------------------\n" - ; - '*UNKNOWN*'; # rv - } ; my $sqltver = $class->req_list_for ('deploy')->{'SQL::Translator'}