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

--- Comment #14 from Chris Cormack <[email protected]> ---
(In reply to Magnus Enger from comment #13)
> (In reply to Chris Cormack from comment #8)
> > The only suggestion I have is that we could perhaps use
> > Module::Load::Conditional
> > in C4/Members.pm, so that we don't have to load the module unless we need 
> > it.
> 
> Something like 
> 
>   use Module::Load::Conditional qw( can_load );
>   can_load( modules => { 'Koha::NorwegianPatronDB qw( NLUpdateHashedPIN
> NLEncryptPIN NLSync )' => undef } );
> 
> instead of plain old 
> 
>   use Koha::NorwegianPatronDB qw( NLUpdateHashedPIN NLEncryptPIN NLSync );
> 
> ?

Yep except wrap it in an if

if (syspref is set) {
  can_load ....
}

eg in Koha::QueryParser::Driver::PQF we do
if ( $format eq 'json' && can_load( modules => { 'JSON' => undef } ) ) {

Hope this helps

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to