[Koha-bugs] [Bug 15182] make test fails immediately on 3.22.00-beta due to missing Crypt::GCrypt which is optional

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 17 02:28:34 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15182

--- Comment #11 from David Cook <dcook at prosentient.com.au> ---
Module::Load and Module::Load::Conditional are both core modules, so I don't
know why Katrin was getting that error... I'm guessing that "load" is exported
in Module::Load::Conditional but that it doesn't get exported into Members.pm
via Module::Load::Conditional.

But that doesn't really matter. As Chris Cormack pointed out in IRC, "can_load"
already loads the module. There's no point trying to do it twice.

You also don't need to import NLUpdateHashedPIN, NLEncryptPIN, and NLSync into
the main namespace, as they're being referred to via the
Koha::NorwegianPatronDB namespace.

What you could do is this:

if ( ! can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) {
   warn "Unable to load Koha::NorwegianPatronDB";
}

instead of 

require Koha::NorwegianPatronDB;

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list