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.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16811
dcc99617-32d9-48b4-a31d-
7c20da2025e4
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 \
# 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* \
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;
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 {
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/;
{ # 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 {
}
#-------------------------------------------------------------------------------
-use Class::DBI;
+use UNIVERSAL::require;
+BEGIN {
+ 'Class::DBI::Frozen::301'->use or 'Class::DBI'->use or die $@;
+}
package Class::DBI;