/[wait]/cvs-head/lib/WAIT/Filter.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /cvs-head/lib/WAIT/Filter.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by cvs2svn, Tue May 9 11:29:45 2000 UTC revision 32 by laperla, Sun Nov 12 09:31:04 2000 UTC
# Line 31  require Exporter; Line 31  require Exporter;
31                  isouc disouc                  isouc disouc
32                  isotr disotr                  isotr disotr
33                  stop grundform                  stop grundform
34                  utf8iso                  utf8iso
35                 );                 );
36  # (most implemented in WAIT.xs)  # (most implemented in WAIT.xs)
37    
# Line 78  sub AUTOLOAD { Line 78  sub AUTOLOAD {
78      *decode_entities = HTML::Entities->can('decode_entities');      *decode_entities = HTML::Entities->can('decode_entities');
79      goto &decode_entities;      goto &decode_entities;
80    } elsif ($func =~ /^d?utf8iso$/) {    } elsif ($func =~ /^d?utf8iso$/) {
     require WAIT::Filter::utf8iso;  
     croak "Your perl version must at least be 5.00556 to use '$func'"  
         if $] < 5.00556;  
81      no strict 'refs';      no strict 'refs';
82      *$func = \&{"WAIT::Filter::utf8iso::$func"};      *$func = sub {
83      goto &utf8iso;        # Courtesy JHI
84          $_[0] =~ s{([\xC0-\xDF])([\x80-\xBF])}{chr(ord($1)<<6&0xC0|ord($2)&0x3F)}eg; #};
85        };
86        goto \&$func;
87    }    }
88    Carp::confess "Class WAIT::Filter::$func not found";    Carp::confess "Class WAIT::Filter::$func not found";
89  }  }
# Line 579  WAIT::Filter - Perl extension providing Line 579  WAIT::Filter - Perl extension providing
579  =head1 SYNOPSIS  =head1 SYNOPSIS
580    
581    use WAIT::Filter qw(Stem Soundex Phonix isolc disolc isouc disouc    use WAIT::Filter qw(Stem Soundex Phonix isolc disolc isouc disouc
582                        isotr disotr stop grundform utf8iso);                        isotr disotr stop grundform);
583    
584    $stem   = Stem($word);    $stem   = Stem($word);
585    $scode  = Soundex($word);    $scode  = Soundex($word);
# Line 691  Calls Text::German::reduce Line 691  Calls Text::German::reduce
691    
692  =item C<$new = >B<utf8iso>C<($word)>  =item C<$new = >B<utf8iso>C<($word)>
693    
694  Convert UTF8 encoded strings to ISO-8859-1. WAIT currently is  Deprecated due to flux in perl versions between 5.005 and 5.8. The
695  internally based on the Latin1 character set, so if you process  function converts UTF8 encoded strings to ISO-8859-1. WAIT is
696    internally still based on the Latin1 character set, so if you process
697  anything in a different encoding, you should convert to Latin1 as the  anything in a different encoding, you should convert to Latin1 as the
698  first filter.  first filter or refrain from using the iso-latin-1 based filter
699    functions. It is recommended that you use your own converter based on
700    the perl version you're using.
701    
702  =item split, split2, split3, ...  =item split, split2, split3, ...
703    

Legend:
Removed from v.31  
changed lines
  Added in v.32

  ViewVC Help
Powered by ViewVC 1.1.26