--- lib/Search/TokyoDystopia.pm 2008/08/18 17:45:56 17 +++ lib/Search/TokyoDystopia.pm 2008/08/18 18:28:05 18 @@ -33,6 +33,14 @@ tcidbput tcidbout tcidbget +tcidbsearch +IDBSSUBSTR +IDBSPREFIX +IDBSSUFFIX +IDBSFULL +IDBSTOKEN +IDBSTOKPRE +IDBSTOKSUF ); =head1 NAME @@ -110,6 +118,22 @@ my $text = tcidbget( $idb, $id ); +=head2 tcidbsearch + + my @ids = tcidbsearch( $idb, $word, IDBSSUBSTR ) + +=cut + +use constant { + IDBSSUBSTR => 0, # substring matching + IDBSPREFIX => 1, # prefix matching + IDBSSUFFIX => 2, # suffix matching + IDBSFULL => 3, # full matching + IDBSTOKEN => 4, # token matching + IDBSTOKPRE => 5, # token prefix matching + IDBSTOKSUF => 6, # token suffix matching +}; + =head1 KNOWN BUGS Low-level functions often just die when called on invalid (or deleted) database