Skip to content

Commit

Permalink
Issue 25: Removed Text::Trim dependency due to it not being acceptabl…
Browse files Browse the repository at this point in the history
…e for Debian
  • Loading branch information
avar committed Feb 18, 2010
1 parent d005705 commit 457fd05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -10,6 +10,7 @@
- Removed Words tokenizer
- Fixed a bug with the DBD::* backends not retrieving the Markov order
from an existing database
- Removed Text::Trim dependency due to it not being acceptable for Debian

0.14 Sat Feb 13 17:07:30 GMT 2010
- Fixed a bug in the test suite preventing optional backends from
Expand Down
1 change: 0 additions & 1 deletion Makefile.PL
Expand Up @@ -38,7 +38,6 @@ requires ('namespace::clean' => '0.13');
requires ('Template' => '2.22');
requires ('Term::ProgressBar' => '2.00');
requires ('Term::ReadLine::Gnu' => '0');
requires ('Text::Trim' => '1.01');

# for the optional backends
recommends ('CHI' => '0.34');
Expand Down
8 changes: 7 additions & 1 deletion lib/Hailo/Tokenizer/Chars.pm
@@ -1,7 +1,6 @@
package Hailo::Tokenizer::Chars;
use 5.010;
use Moose;
use Text::Trim;
use namespace::clean -except => 'meta';

our $VERSION = '0.14';
Expand Down Expand Up @@ -38,6 +37,13 @@ sub make_output {
return trim(join '', map { $_->[1] } @$tokens);
}

sub trim {
my $txt = shift;
$txt =~ s/^\s+//;
$txt =~ s/\s+$//;
return $txt;
}

__PACKAGE__->meta->make_immutable;

=encoding utf8
Expand Down

0 comments on commit 457fd05

Please sign in to comment.