絵日記 グルメ ライフスタイル・暮らし ペット 旅行・海外 日記 ニュース スポーツ ビジネス・経済 趣味・創作 音楽 書籍・雑誌 漫画・アニメ ゲーム 受験・学校 ヘルス・ビューティ IT・家電 学問・科学 まとめ
File::Morkモジュールのマルチバイト対応で書いたパッチを先日、File::Morkの作者のSimon Wistowさんに送った所、採用していただいた。ありがとうございます。このパッチがあたったバージョンであるFile::Mork 0.3もCPANにあがったので、これでいつでもFile::Morkで日本語が扱える。 そもそもこのパッチは、PlaggerとSubscription::BrowserHistoryで自分のWebブラウジングをトラッキングでかいたSubscription::BrowserHistoryのために書いたものだったりする。このプラグインも、これまでパッチなしのFile::Morkだと日本語がだめだったのが、最新版のFile::Morkを使えば日本語も無問題。Subscription::BrowserHistoryのコードだけプラグインディレクトリにおいてもらえれば
HTML::Selector::XPath をリリース CSS Selector in Perl とか subtech - Bulknews::Subtech - CSS selector to XPath あたりで議論していた CSS 2 Selectors to XPath コンパイラなモジュールをつくって、CPAN に HTML::Selector::XPath としてリリースしました。 使い方は naoya さんが先に書いてますが、HTML から正規表現を使うことなくスクレイプするのに便利。たとえば Mixi にログインしてマイミク最新日記と、1件目のタイトル、本文を抜き出すコードが、以下のようにかけます。 #!/usr/bin/perl use strict; use warnings; use utf8; use Encode; use HTML::Selector::XPat
Lingua::JA::Hepburn::Passport でヘボン式ローマ字変換 ひらがな/カタカナからヘボン式ローマ字に変換するモジュール をリリースしました。 同じようなことをするモジュールは Lingua::JA::Romaji, Linguua::JA::Romanize::Kana, Text::Kakasi といろいろあるんですが、日本の外務省パスポートのルール にあるヘボン式に則ったものは1個もなかったので車輪の再発明。 use utf8; use Lingua::JA::Hepburn::Passport; my $hepburn = Lingua::JA::Hepburne::Passport->new; $hepburn->romanize("みやがわ"); # MIYAGAWA $hepburn->romanize("おおの"); # ONO $hepburn->r
mixi の話。ある事柄に関係のあるコミュニティの一覧リストを作ろうと思って、いままでちまちまと手作業していたものを、プログラムにやらせようと重い腰を上げて取りかかることにした。 取りかかるにあたっては、少し前から Perl 界隈では Plagger というのが流行っているらしく、これで mixi も扱えるようなことがどこかで言及されていたようなことを覚えていたこともあり、──かなり曖昧だけれど、でも流行に触れてみるという意味でもこれをまずは見てみようとは思っていたので、ちょうどいい機会かもしれないし、まずは Plagger をインストールすることから始めることにした。 そうして膨大な数のモジュールをインストールして(いち日では済まなかった... )、なんとかサンプルが動くまでには行ったのだけれど、ただドキュメントが本家の所にも少なくて、 Plagger についてはそれ以上進めるのが難しか
CPAN::Mini で CPAN のミラーをローカルに DECON で話してきたネタですがちょっと詳しく。 飛行機やら電車の中やらでオフラインハックするときに(たまに)問題になるのが CPAN モジュールの不足です。「あぁ、このマシンにはあのモジュール入ってねぇ~」とかでハックが滞るのは萎えます。というわけで minicpan。CPAN::Mini というモジュールで、CPAN モジュールの最新版だけを持ってきてミラーをつくることができます。 導入は簡単で、CPAN から install CPAN::Mini すると minicpan というコマンドが付属してきます。コマンドラインから使うには、 > minicpan -r http://ftp.funet.fi/pub/languages/perl/CPAN/ -l ~/minicpan とかすれば finet から HTTP で同期で
21:16 追記 0.01には重大なバグがありました。move_uriを使うと無限ループに陥ります。「リクエストが多すぎて処理できません」のようなエラーになって画面が表示されません。fixedな0.02をアップしなおしましたので、そちらをどうぞ。明日にはインデックスされるはず。。。いやはやひどい凡ミスだ。。。 CGI::Application::Dispatchを使っているときに、テンプレートの相対パスがずれる問題を解決するための CGI::Application::Dispatch::BuildURI というモジュールをリリースしました。関係ありそうな以前のエントリはこちら。 詳細はドキュメントなりソースなりtarballに付属のテストなりをご覧ください。 下手な英語よりも日本語でモジュールの解説をしなおしたほうがいいかと思っていろいろ書いたのですが、どうも下手なのは英語だけではなかった
初めて CPAN に module をアップしてみました。HOWTO についていろんなドキュメント読みつつ、週末嫁を寝かしつけた上でこっそりと module 用の pod ドキュメントを書きつつ... やっとこさ形になりました。これで気分はいっぱしの Perl 野郎(気分だけ?)。 http://search.cpan.org/~bashi/ 以下モジュールの簡単な概要です。詳細は CPAN 上のドキュメントを参照って事で。 名前 Imager::DTP - 画像に対して文字を描画するモジュール。マルチバイト文字対応で、さらにDTPアプリちっくなオプション機能付き。 概要 元は、情報誌制作システム系の業務案件にて ブラウザ入力した情報を、即座に、情報誌体裁に落とし込んだJPEG画像として同ブラウザ上で確認したい。 というニーズに対して Perl を用いて実現検討した結果できたものです。検討
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く