#!/usr/bin/perl
use strict;
use Perl6::Say;
undef &Perl6::Say::say;
sub my_say {
my $this = shift;
print @_;
$this;
}
*Perl6::Say::say = \&my_say;
STDERR->say('フォォーー!!')->say('セイ')->say('セイ')->say('セイ');
こういうのは、おとなしく
package IO::HG4;
use base qw(IO::Handle);
sub say {
my $this = shift;
print @_;
$this;
}
IO::HG4->new->say('フォォーー!!')->say('セイ')->say('セイ')->say('セイ');
するのがいいと思った。
とりあえず書き上げました。
またまた適当クオリティですが...
lang/perl/Net-Kotonoha - CodeRepos
使い方は...
use warnings;
use encoding 'utf-8';
use Net::Kotonoha;
use Data::Dumper;
use Encode;
my $kotonoha = Net::Kotonoha->new(
mail => 'xxxx@example.com',
password => 'xxxxxxx',
);
warn Dumper $kotonoha->newer_list;
my $koto = $kotonoha->get_koto(120235);
warn $koto->title;
warn Dumper $koto->yesman;
warn Dumper $koto->noman;
$koto->answer(1, 'けもたい');
warn Dumper $koto->answer;
※一覧系の戻りはハッシュの配列
こんな感じ...
まぁ、UIで遊ぶサービスですから、あまり使い道はないかもしれませんが...
追記
cpanに入れてありますので「cpan Net::Kotonoha」で入ります。