This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require("json"); | |
| require("socket.http") | |
| require("socket.url") | |
| function babelfish(lang, query) | |
| lang = lang or "en" | |
| query = query or "" | |
| if lang == "en" or query == "" then | |
| return query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # showtooltip | |
| /cleartarget [dead] | |
| /targetlastenemy [noexists] | |
| /targetenemy [noexists] | |
| /cleartarget [dead] | |
| /stopmacro [noexists] | |
| /cast Hunter's Mark |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Config::Pit; | |
| use HTTP::Cookies; | |
| use URI; | |
| use WWW::Mechanize; | |
| use XML::LibXML; | |
| use App::Options( | |
| option => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use 5.010; | |
| use List::Util qw/first/; | |
| given ('foo') { | |
| warn first { $_ eq 'foo' } qw/ bar baz /; # => bar | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Benchmark; | |
| my %a = ( | |
| foo => 1, | |
| bar => 2, | |
| baz => 3, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub foo { | |
| my ($self, $args) = rule { | |
| uri => { isa => 'Str', xor => [qw(schema host path_query)] }, | |
| schema => { isa => 'Str', default => 'http' }, | |
| host => { isa => 'Str', default => '127.0.0.1' }, | |
| path_query => { isa => 'Str', default => '/' }, | |
| method => { isa => 'Str', default => 'GET' }, | |
| } @_; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ perl bench-vs-mobile.pl docomo | |
| docomo 1000 | |
| (warning: too few iterations for a reliable count) | |
| (warning: too few iterations for a reliable count) | |
| Rate mobile emoji | |
| mobile 4167/s -- -17% | |
| emoji 5000/s 20% -- | |
| $ perl bench-vs-mobile.pl kddi | |
| kddi 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: t/mime_header_iso2022jp.t | |
| =================================================================== | |
| --- t/mime_header_iso2022jp.t (リビジョン 38732) | |
| +++ t/mime_header_iso2022jp.t (作業コピー) | |
| @@ -43,6 +43,9 @@ | |
| is(encode('euc-jp', $utf8), $decoded); | |
| is($header, $encoded); | |
| + | |
| + $utf8 = Encode::decode('MIME-Header-ISO_2022_JP', $header); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/Encode/MIME/Header.pm b/lib/Encode/MIME/Header.pm | |
| index 5f209b2..d61b589 100644 | |
| --- a/lib/Encode/MIME/Header.pm | |
| +++ b/lib/Encode/MIME/Header.pm | |
| @@ -61,10 +61,10 @@ sub decode($$;$) { | |
| }{ | |
| if (uc($2) eq 'B'){ | |
| $obj->{decode_b} or croak qq(MIME "B" unsupported); | |
| - decode_b($1, $3, $chk); | |
| + $obj->decode_b($1, $3, $chk); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package PerlIO::via::Ikamusume; | |
| use strict; | |
| use warnings; | |
| use Encode; | |
| use Acme::Ikamusume; | |
| sub import { | |
| binmode STDOUT => ':via(Ikamusume)'; | |
| } |
OlderNewer