Guest User

Untitled

a guest
Jul 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. package PerlIO::via::Ikamusume;
  2. use strict;
  3. use warnings;
  4. use Encode;
  5. use Acme::Ikamusume;
  6.  
  7. sub import {
  8. binmode STDOUT => ':via(Ikamusume)';
  9. }
  10.  
  11. sub PUSHED {
  12. my ($class, $mode, $fh) = @_;
  13. bless {}, $class;
  14. }
  15.  
  16. sub WRITE {
  17. my ($self, $buf, $fh) = @_;
  18. print $fh $self->geso($buf);
  19. 1;
  20. }
  21.  
  22. sub geso {
  23. my ($self, $text) = @_;
  24. $text = Encode::decode_utf8($text);
  25. $text = Acme::Ikamusume->geso($text);
  26. Encode::encode_utf8($text);
  27. }
  28.  
  29. 1;
Add Comment
Please, Sign In to add comment