[Koha-patches] [PATCH] Prevent compilation errors from complex C4 import/export.

Joe Atzberger joe.atzberger at liblime.com
Thu Aug 14 19:09:06 CEST 2008


From: Northeast Kansas Library System <nekls at ldmo02.ec2.liblime.com>

SIP code uses UNIVERSAL modules that do not tolerate the circular deps in
C4, specifically, in Auth.pm.  Changing the order so that UNIVERSAL follows
the other imports is important to avoiding failures like:
  perl -w -e 'use UNIVERSAL qw(can); use C4::Auth;'
  "MarkIssueReturned" is not exported by the C4::Circulation module

This patch should resolve the problem earlier seen with Shelves too.
---
 C4/SIP/Sip/MsgType.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm
index 6ff6b7b..ae76630 100644
--- a/C4/SIP/Sip/MsgType.pm
+++ b/C4/SIP/Sip/MsgType.pm
@@ -10,7 +10,6 @@ use strict;
 use warnings;
 use Exporter;
 use Sys::Syslog qw(syslog);
-use UNIVERSAL qw(can);
 
 use Sip qw(:all);
 use Sip::Constants qw(:all);
@@ -20,6 +19,8 @@ use Data::Dumper;
 use CGI;
 use C4::Auth qw(&check_api_auth);
 
+use UNIVERSAL qw(can);	# make sure this is *after* C4 modules.
+
 use vars qw(@ISA $VERSION @EXPORT_OK);
 
 BEGIN {
-- 
1.5.6




More information about the Koha-patches mailing list