From: miker Date: Tue, 4 Jan 2011 15:26:30 +0000 (+0000) Subject: Patch from Robert Soulliere to backport Class::DBI version checking from 2.0: https... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c29ee83dc381555f021208395b27e607f65a3521;p=Evergreen.git Patch from Robert Soulliere to backport Class::DBI version checking from 2.0: https://bugs.launchpad.net/evergreen/+bug/692717 git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_2@19099 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index f0f3181214..eb50125a87 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -229,6 +229,9 @@ CPAN_MODULES_MARC = \ MARC::File::XML \ Net::Z3950::ZOOM +CPAN_MODULES_FORCE = \ + Class::DBI::Frozen::301 + # ---------------------------------------------------------------------------- all: @@ -267,6 +270,12 @@ install_cpan: install_cpan_marc: for m in $(CPAN_MODULES_MARC); do perl -MCPAN -e "install \"$$m\";"; done +# Force Install CPAN modules. +install_cpan_force: + for m in $(CPAN_MODULES_FORCE); do \ + echo "force install $$m" | perl -MCPAN -e shell ;\ + done + # Install a known working version of YAZ install_yaz: if [ ! -d $(YAZ) ]; then wget $(YAZ_HOST)/$(YAZ).tar.gz; fi; diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm index 419179c9f1..80801a2d8c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm @@ -1,6 +1,10 @@ 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; @@ -22,6 +26,10 @@ use OpenSRF::EX qw/:try/; our $VERSION = 1; 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 incompatible with Evergreen. You will need to downgrade to version 3.0.1 or install Class::DBI::Frozen::301"); +} + sub child_init { my $self = shift;