Skip to content

Commit

Permalink
warn and skip undefined transliteration mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
karpet committed Aug 15, 2014
1 parent 43c490e commit 7849f4c
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 19 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
Revision history for Perl extension Search::HiLiter.

1.002 xxx
- warn and skip undefined transliteration mappings

1.001 23 July 2014
- zap use of File::Slurp in tests
- small optimization to to_utf8() to privilege is_ascii() over
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools.pm
Expand Up @@ -6,7 +6,7 @@ use Carp;
use Scalar::Util qw( openhandle );
use File::Basename;

our $VERSION = '1.001';
our $VERSION = '1.002';

use XSLoader;
XSLoader::load( 'Search::Tools', $VERSION );
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/ArgNormalizer.pm
Expand Up @@ -4,7 +4,7 @@ use Carp;
use Scalar::Util qw( blessed );
use Data::Dump qw( dump );

our $VERSION = '1.001';
our $VERSION = '1.002';

sub BUILDARGS {
my $self = shift;
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/HeatMap.pm
Expand Up @@ -6,7 +6,7 @@ extends 'Search::Tools::Object';

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

# debugging only
my $OPEN = '[';
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/HiLiter.pm
Expand Up @@ -10,7 +10,7 @@ use Data::Dump qw( dump );

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

my $XML = Search::Tools::XML->new;

Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/Object.pm
Expand Up @@ -11,7 +11,7 @@ has 'debug' => (
}
);

our $VERSION = '1.001';
our $VERSION = '1.002';

1;

Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/Query.pm
Expand Up @@ -14,7 +14,7 @@ use Search::Tools::XML;

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

has 'terms' => ( is => 'ro' );
has 'fields' => ( is => 'ro' );
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/QueryParser.pm
Expand Up @@ -13,7 +13,7 @@ use Search::Tools::RegEx;

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

my $XML = Search::Tools::XML->new();
my $C2E = $XML->char2ent_map;
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/RegEx.pm
Expand Up @@ -11,7 +11,7 @@ use overload

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

my @ro_attrs = qw(
plain
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/Snipper.pm
Expand Up @@ -11,7 +11,7 @@ use Search::Tools::HeatMap;

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

# extra space here so pmvers works against $VERSION
our $ellip = ' ... ';
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/SpellCheck.pm
Expand Up @@ -5,7 +5,7 @@ extends 'Search::Tools::Object';
use Text::Aspell;
use Search::Tools::QueryParser;

our $VERSION = '1.001';
our $VERSION = '1.002';

has 'query_parser' =>
( is => 'rw', default => sub { Search::Tools::QueryParser->new() } );
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/Token.pm
Expand Up @@ -7,7 +7,7 @@ use overload

use Search::Tools; # XS required

our $VERSION = '1.001';
our $VERSION = '1.002';

1;

Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/TokenList.pm
Expand Up @@ -11,7 +11,7 @@ use Carp;

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

1;

Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/TokenListPP.pm
Expand Up @@ -8,7 +8,7 @@ use overload
use Carp;
with 'Search::Tools::TokenListUtils';

our $VERSION = '1.001';
our $VERSION = '1.002';

has 'pos' => ( is => 'rw' );
has 'num' => ( is => 'rw' );
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/TokenListUtils.pm
Expand Up @@ -2,7 +2,7 @@ package Search::Tools::TokenListUtils;
use Moo::Role;
use Carp;

our $VERSION = '1.001';
our $VERSION = '1.002';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/TokenPP.pm
Expand Up @@ -9,7 +9,7 @@ use overload

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

my @attrs
= qw( is_match is_hot pos str len u8len is_sentence_start is_sentence_end );
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/Tokenizer.pm
Expand Up @@ -7,7 +7,7 @@ use Search::Tools::TokenList;
use Search::Tools::UTF8;
use Carp;

our $VERSION = '1.001';
our $VERSION = '1.002';

has 're' => ( is => 'rw', default => sub {qr/\w+(?:[\'\-\.]\w+)*/} );

Expand Down
6 changes: 5 additions & 1 deletion lib/Search/Tools/Transliterate.pm
Expand Up @@ -10,7 +10,7 @@ use Data::Dump qw( dump );
has 'ebit' => ( is => 'rw', default => sub {1} );
has 'map' => ( is => 'ro' );

our $VERSION = '1.001';
our $VERSION = '1.002';

=pod
Expand Down Expand Up @@ -175,6 +175,10 @@ sub _init_map {
while (<DATA>) {
chomp;
my ( $from, $to ) = (m/^(<U.+?>)\ (.+)$/);
if ( !defined $to ) {
warn "Undefined mapping for $_\n";
next;
}
my @o = split( /;/, $to );
$MAP{ _Utag_to_chr($from) } = _Utag_to_chr( $o[0] );
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/UTF8.pm
Expand Up @@ -27,7 +27,7 @@ our @EXPORT = qw(

our $Debug = ( $ENV{PERL_DEBUG} && $ENV{PERL_DEBUG} > 2 ) ? 1 : 0;

our $VERSION = '1.001';
our $VERSION = '1.002';

sub to_utf8 {
my $str = shift;
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Tools/XML.pm
Expand Up @@ -6,7 +6,7 @@ use Search::Tools::UTF8;

use namespace::sweep;

our $VERSION = '1.001';
our $VERSION = '1.002';

=pod
Expand Down

0 comments on commit 7849f4c

Please sign in to comment.