root/trunk/plagger/lib/Plagger/Plugin/Filter/Romanize.pm

Revision 424 (checked in by miyagawa, 15 years ago)

fix Romanizer API

Line 
1 package Plagger::Plugin::Filter::Romanize;
2 use strict;
3 use warnings;
4 use base qw( Plagger::Plugin::Filter::Base );
5
6 our $VERSION = 0.01;
7
8 use Encode;
9
10 sub filter {
11     my($self, $text) = @_;
12
13     my $result = '';
14     my $count = 0;
15
16     my @chars = $self->romanize($text);
17     return (scalar(@chars), join(' ', @chars));
18 }
19
20 sub romanize {
21     my $self = shift;
22     Plagger->context->error(ref($self) . " should override romanize");
23 }
24
25 1;
Note: See TracBrowser for help on using the browser.