Make Text::Aspell optional. This is mostly to unblock development on HEAD
for those of us who can't get Text::Aspell to work, with no UI components added to show that the spell checker is disabled.
This commit is contained in:
parent
37aad09679
commit
d5be2abcf3
4 changed files with 6 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
7.2.0
|
7.2.0
|
||||||
- Added server side spellchecker (Martin Kamerbeek / Procolix)
|
- Added server side spellchecker (Martin Kamerbeek / Procolix)
|
||||||
|
- change: made Text::Aspell optional, nullifying spellchecker if not present
|
||||||
|
|
||||||
7.1.2
|
7.1.2
|
||||||
- Fixed a bug that caused workflows to fail if collaboration systems and
|
- Fixed a bug that caused workflows to fail if collaboration systems and
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use WebGUI::Asset;
|
||||||
use WebGUI::Form;
|
use WebGUI::Form;
|
||||||
use WebGUI::Utility;
|
use WebGUI::Utility;
|
||||||
use WebGUI::International;
|
use WebGUI::International;
|
||||||
use Text::Aspell;
|
eval 'use Text::Aspell'; # Optional
|
||||||
|
|
||||||
our @ISA = qw(WebGUI::Asset);
|
our @ISA = qw(WebGUI::Asset);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ package WebGUI::Operation::SpellCheck;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Encode;
|
use Encode;
|
||||||
use Text::Aspell;
|
# Optional, but if unavailable, spell checking will have no effect.
|
||||||
|
eval 'use Text::Aspell';
|
||||||
use WebGUI::Utility;
|
use WebGUI::Utility;
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
@ -40,6 +41,7 @@ An instanciated session object.
|
||||||
sub _getSpeller {
|
sub _getSpeller {
|
||||||
my ($baseDir, $userDir, $homeDir);
|
my ($baseDir, $userDir, $homeDir);
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
|
return undef unless Text::Aspell->can('new');
|
||||||
my $speller = Text::Aspell->new;
|
my $speller = Text::Aspell->new;
|
||||||
|
|
||||||
# Get language
|
# Get language
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ checkModule("URI::Escape","3.28");
|
||||||
checkModule("POSIX");
|
checkModule("POSIX");
|
||||||
checkModule("List::Util");
|
checkModule("List::Util");
|
||||||
checkModule("Color::Calc");
|
checkModule("Color::Calc");
|
||||||
checkModule("Text::Aspell");
|
checkModule("Text::Aspell",0.01,2);
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
# Checking WebGUI
|
# Checking WebGUI
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue