Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package PerlIO::via::Ikamusume;
- use strict;
- use warnings;
- use Encode;
- use Acme::Ikamusume;
- sub import {
- binmode STDOUT => ':via(Ikamusume)';
- }
- sub PUSHED {
- my ($class, $mode, $fh) = @_;
- bless {}, $class;
- }
- sub WRITE {
- my ($self, $buf, $fh) = @_;
- print $fh $self->geso($buf);
- 1;
- }
- sub geso {
- my ($self, $text) = @_;
- $text = Encode::decode_utf8($text);
- $text = Acme::Ikamusume->geso($text);
- Encode::encode_utf8($text);
- }
- 1;
Add Comment
Please, Sign In to add comment