I copied the relevant code from SpellChecker.pm and placed a comment on line 263:
sub next_word { my $self = shift; pos $self->{text} = $self->{position}; my $word; my $sp = $self->_hunspell || $self->_aspell; while ($self->{text} =~ m/([a-zA-Z]+(?:'[a-zA-Z]+)?)/g) { $word = $1; next if $self->{ignore_list}{$word}; last if !$sp->check($word); # 263
There were many regex changes introduced in perl 5.10. I would start looking there. I have no time to investigate further right now. I would make a local copy of this .pm file and start adding print statements to debug it further.
This should be submitted as a bug report. (Update: looks like the author is aware of this issue). Here is a reduced code example which still reproduces the error:
use warnings; use strict; use Text::SpellChecker; my $checker = Text::SpellChecker->new( text => "Foor" ); my $word = $checker->next_word;
In reply to Re: Text-SpellChecker error
by toolic
in thread Text-SpellChecker error
by sarvan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |