Practice of Programming

プログラム とか Linuxとかの話題

2010-04-01から1ヶ月間の記事一覧

select some sections from Module's POD

Pod::Section Usage: % podsection Catalyst SYNOPSIS # as text % podsection -u Catalyst SYNOPSIS # as plain pod % podsection Catalyst req # show pod of req methodExamle: %podsection Catalyst req res $c->req Returns the current Catalyst::Requ…

デモでパスワードが必要な時は

perl-casual #2 の ustream を聞いてると、makiさんが、Live Codingしているときに「パスワード見えちゃうなー」みたいなことを言っていたので。 たぶん、ご存知だとは思いますが、パスワードが必要なデモをする時は IO::Prompt 使うといいんじゃないでしょ…

Util::Any 0.20

In this version, 2 features are added. able to specify default kind of exports. able to define the kind which doesn't export anything, but executes code. default exports example: package Your::Utils; use Util::Any -Base; our $Utils = Clone…

逆引きにはまる

DNS

VMで動かしているWebアプリの反応が尋常じゃなく遅かったので、調べていた。 構成は以下のようになっている。 [自機] -- [開発機(ルータ)] -- [VM(開発機内)]VM内でWebアプリたたく分には速かったのですが、外から叩くと異様に遅い。 traceroute も遅い...け…

JSON, YAML & utf8 flag

------------------------------------------- JSON ------------------------------------------- SUBROUTINE INPUT OUTPUT ENCODE to_json(JSON) byte flag latin1 to_json(JSON) flag flag utf8 from_json(JSON) byte flag latin1 from_json(JSON) flag f…

compare Sub::Install/Data::Util/ExportTo for installing subroutine

To install subroutine, you can use Data::Util, Sub::Install or ExportTo. Rate sub_install export_to data_util_pp data_util sub_install 17980/s -- -65% -83% -90% export_to 51200/s 185% -- -50% -71% data_util_pp 103357/s 475% 102% -- -42% da…

Util::Any 0.19

I've released new version Util::Any 0.19. List::Pairwise functions are included in -list. use Util::Any -list; my @n = (1,2,3,4,5,6,7,8,9,10); mapp {$a *= 10; $b /= 2} @n; print "@n"; # 10 1 30 2 50 3 70 4 90 5