@@ -, +, @@ --------- 1) Set the Enhanced Content system preference TagsExternalDictionary to /usr/bin/ispell 2) sudo apt-get install liblingua-ispell-perl -- should be a new install 3) prove t/db_dependent/Tags.t -- should work fine 4) sudo apt-get remove liblingua-ispell-perl 5) prove t/db_dependent/Tags.t -- should explode 6) Clear the Enhanced Content system preference TagsExternalDictionary 7) prove t/db_dependent/Tags.t -- should work fine 8) apply patch 9) prove t/db_dependent/Tags.t -- should work fine TagsExternalDictionary to /usr/bin/ispell -- should work, with warning. -- should work fine --- C4/Installer/PerlDependencies.pm | 5 +++++ C4/Tags.pm | 5 +++++ 2 files changed, 10 insertions(+) --- a/C4/Installer/PerlDependencies.pm +++ a/C4/Installer/PerlDependencies.pm @@ -802,6 +802,11 @@ our $PERL_DEPS = { 'required' => '1', 'min_ver' => '0.14', }, + 'Lingua::Ispell' => { + 'usage' => 'Enhanced Content - Tagging', + 'required' => '0', + 'min_ver' => '0.07' + }, }; 1; --- a/C4/Tags.pm +++ a/C4/Tags.pm @@ -25,6 +25,7 @@ use Exporter; use C4::Context; use C4::Debug; +use Module::Load::Conditional qw/check_install/; #use Data::Dumper; use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created); use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM tags_all\n"; @@ -50,6 +51,10 @@ BEGIN { ); # %EXPORT_TAGS = (); my $ext_dict = C4::Context->preference('TagsExternalDictionary'); + if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) { + warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed."; + $ext_dict = q{}; + } if ($debug) { require Data::Dumper; import Data::Dumper qw(:DEFAULT); --