[open-ils-commits] r16811 - in trunk/Open-ILS/src: extras perlmods/OpenILS/Application/Storage perlmods/OpenILS/Application/Storage/Driver perlmods/OpenILS/Application/Storage/Driver/Pg (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jun 24 23:54:49 EDT 2010
Author: dbs
Date: 2010-06-24 23:54:46 -0400 (Thu, 24 Jun 2010)
New Revision: 16811
Modified:
trunk/Open-ILS/src/extras/Makefile.install
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/cdbi.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm
Log:
Provide support for Class::DBI::Frozen::301 via UNIVERSAL::require
Class::DBI changed its API interfaces after the 3.0.1 release, causing much
pain (and incompatibility for existing applications like Evergreen). Some
distributions package Class::DBI 0.96 or 3.0.1, but newer distributions
package an incompatible 3.0.17. An alternative is to install the
Class::DBI::Frozen::301 module from source; UNIVERSAL::require enables us
to try loading both and use whichever one we find.
Modified: trunk/Open-ILS/src/extras/Makefile.install
===================================================================
--- trunk/Open-ILS/src/extras/Makefile.install 2010-06-24 23:52:29 UTC (rev 16810)
+++ trunk/Open-ILS/src/extras/Makefile.install 2010-06-25 03:54:46 UTC (rev 16811)
@@ -167,10 +167,10 @@
libssh2-devel \
libyaz \
libyaz-devel \
+ mod_ssl \
ncurses-devel \
ncurses-libs \
perl-Business-CreditCard \
- perl-Class-DBI-Pg \
perl-Email-Send \
perl-GDGraph3d \
perl-MARC-Record \
@@ -190,7 +190,8 @@
# Should be fixed in 3.22
FEDORA_13_CPAN = \
Business::OnlinePayment \
- Business::OnlinePayment::AuthorizeNet
+ Business::OnlinePayment::AuthorizeNet \
+ Class::DBI::Frozen::301
PGSQL_84_RPMS = \
postgresql-8.4* \
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm 2010-06-24 23:52:29 UTC (rev 16810)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm 2010-06-25 03:54:46 UTC (rev 16811)
@@ -1,6 +1,9 @@
package OpenILS::Application::Storage::CDBI;
+use UNIVERSAL::require;
+BEGIN {
+ 'Class::DBI::Frozen::301'->use or 'Class::DBI'->use or die $@;
+}
use base qw/Class::DBI/;
-use Class::DBI;
use Class::DBI::AbstractSearch;
use OpenILS::Application::Storage::CDBI::actor;
@@ -23,8 +26,8 @@
my $log = 'OpenSRF::Utils::Logger';
if ($Class::DBI::VERSION gt '3.0.1') {
- $log->error("Your version of Class::DBI, $Class::DBI::VERSION, is too new and incompatable with Evergreen. You will need to downgrade to version 3.0.1");
- die("Your version of Class::DBI, $Class::DBI::VERSION, is too new and incompatable with Evergreen. You will need to downgrade to version 3.0.1");
+ $log->error("Your version of Class::DBI, $Class::DBI::VERSION, is too new and incompatible with Evergreen. You will need to downgrade to version 3.0.1 or install Class::DBI::Frozen::301");
+ die("Your version of Class::DBI, $Class::DBI::VERSION, is too new and incompatible with Evergreen. You will need to downgrade to version 3.0.1 or install Class::DBI::Frozen::301");
}
sub child_init {
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/cdbi.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/cdbi.pm 2010-06-24 23:52:29 UTC (rev 16810)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/cdbi.pm 2010-06-25 03:54:46 UTC (rev 16811)
@@ -1,7 +1,10 @@
{ # Based on the change to Class::DBI in OpenILS::Application::Storage. This will
# allow us to use TSearch2 via a simple cdbi "search" interface.
#-------------------------------------------------------------------------------
- use Class::DBI;
+ use UNIVERSAL::require;
+ BEGIN {
+ 'Class::DBI::Frozen::301'->use or 'Class::DBI'->use or die $@;
+ }
package Class::DBI;
sub search_fts {
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg.pm 2010-06-24 23:52:29 UTC (rev 16810)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg.pm 2010-06-25 03:54:46 UTC (rev 16811)
@@ -14,7 +14,10 @@
use OpenILS::Application::Storage::Driver::Pg::fts;
use OpenILS::Application::Storage::Driver::Pg::storage;
use OpenILS::Application::Storage::Driver::Pg::dbi;
- use Class::DBI;
+ use UNIVERSAL::require;
+ BEGIN {
+ 'Class::DBI::Frozen::301'->use or 'Class::DBI'->use or die $@;
+ }
use base qw/Class::DBI OpenILS::Application::Storage/;
use DBI;
use OpenSRF::EX qw/:try/;
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm 2010-06-24 23:52:29 UTC (rev 16810)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm 2010-06-25 03:54:46 UTC (rev 16811)
@@ -237,7 +237,10 @@
}
#-------------------------------------------------------------------------------
-use Class::DBI;
+use UNIVERSAL::require;
+BEGIN {
+ 'Class::DBI::Frozen::301'->use or 'Class::DBI'->use or die $@;
+}
package Class::DBI;
More information about the open-ils-commits
mailing list