Bugzilla – Attachment 44906 Details for
Bug 15182
make test fails immediately on 3.22.00-beta due to missing Crypt::GCrypt which is optional
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 15182 - [alternate] - Conditionally load Koha::NorwegianPatronDB
PASSED-QA-Bug-15182---alternate---Conditionally-lo.patch (text/plain), 1.76 KB, created by
Katrin Fischer
on 2015-11-17 11:51:48 UTC
(
hide
)
Description:
[PASSED QA] Bug 15182 - [alternate] - Conditionally load Koha::NorwegianPatronDB
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-11-17 11:51:48 UTC
Size:
1.76 KB
patch
obsolete
>From 6fcdee72d4d7c9b1b6d8a24ad2301d1a8236935a Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 17 Nov 2015 12:36:16 +1100 >Subject: [PATCH] [PASSED QA] Bug 15182 - [alternate] - Conditionally load > Koha::NorwegianPatronDB > >This patch loads Koha::NorwegianPatronDB if it can, or adds a warning >to the log if it can't load it. > >Since the Koha::NorwegianPatronDB functionality in C4::Members is >wrapped in system preferences, the loading of the module is >irrelevant unless one actually wants to use the module and its >associated functionality. > >NOTE: > >This patch fixes a problem where we were getting errors saying >Crypt::GCrypt couldn't be loaded even though it's not a required >dependency. > >This patch will likely only affect people not using Debian-based >systems where libcrypt-gcrypt-perl is available. The current >version of Crypt::GCrypt doesn't build so it's not an option >for most non-Debian users to install this not required >dependency in order to work around this issue... > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised for Debian-based systems > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Members.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 2616598..19a7cfc 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -40,7 +40,11 @@ use Koha::Borrower::Debarments qw(IsDebarred); > use Text::Unaccent qw( unac_string ); > use Koha::AuthUtils qw(hash_password); > use Koha::Database; >-require Koha::NorwegianPatronDB; >+ >+use Module::Load::Conditional qw( can_load ); >+if ( ! can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) { >+ warn "Unable to load Koha::NorwegianPatronDB"; >+} > > our ($VERSION,@ISA,@EXPORT,@EXPORT_OK,$debug); > >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15182
:
44813
|
44842
|
44844
|
44898
|
44900
| 44906