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:
Drake 2006-10-20 20:56:13 +00:00
parent 37aad09679
commit d5be2abcf3
4 changed files with 6 additions and 3 deletions

View file

@ -19,7 +19,7 @@ use WebGUI::Asset;
use WebGUI::Form;
use WebGUI::Utility;
use WebGUI::International;
use Text::Aspell;
eval 'use Text::Aspell'; # Optional
our @ISA = qw(WebGUI::Asset);

View file

@ -12,7 +12,8 @@ package WebGUI::Operation::SpellCheck;
use strict;
use Encode;
use Text::Aspell;
# Optional, but if unavailable, spell checking will have no effect.
eval 'use Text::Aspell';
use WebGUI::Utility;
=head1 NAME
@ -40,6 +41,7 @@ An instanciated session object.
sub _getSpeller {
my ($baseDir, $userDir, $homeDir);
my $session = shift;
return undef unless Text::Aspell->can('new');
my $speller = Text::Aspell->new;
# Get language