キクタンおわった(といってもちゃんと覚えてるの半分?くらいだ)けどなんか、前より英語力落ちてる気がする。

つか、なんか英語を書く気にどうしてもなれない。なんだろう。

んで、そんな気分だったのでPlugin::Flavourのドキュメントなんもかかずにアップしたらなんか叩かれてる、、なぁ。

by typester / at 2006-09-02T23:52:00 / life / Comment

Chained

Chainedアクションを使って、/ユーザー名/... だとそのユーザーのエントリを表示。

/... だと全員のエントリを表示するアプリケーションの例。

最後にはてなっぽく /ユーザー名/profile もつけてある。

package MyApp::Controller::UserView;

use strict;
use warnings;
use base 'Catalyst::Controller';

sub user_detect :Chained('/') :PathPart('') :CaptureArgs(1) {
    my ($self, $c, $user) = @_;
    $c->stash->{user} = $c->model('DBIC::User')->find({ username => $user })
        or $c->detach('/default');
}

sub user_root :Chained('user_detect') :PathPart('') :Args(0) {
    my ($self, $c) = @_;
    $c->forward('/view/index');
}

sub user_tag :Chained('user_detect') :PathPart('tag') :Args(1) {
    my ($self, $c, $tags) = @_;
    $c->forward('/view/tag');
}

sub user_year :Chained('user_detect') :PathPart('') :Args(1) {
    my ($self, $c, $year) = @_;
    $c->forward('/view/year');
}

sub user_month :Chained('user_detect') :PathPart('') :Args(2) {
    my ($self, $c, $year, $month) = @_;
    $c->forward('/view/month');
}

sub user_day :Chained('user_detect') :PathPart('') :Args(3) {
    my ($self, $c, $year, $month, $day) = @_;
    $c->forward('/view/day');
}

sub user_permalink :Chained('user_detect') :PathPart('') :Args(4) {
    my ($self, $c, $year, $month, $day, $id) = @_;
    $c->forward('/view/permalink');
}

sub user_profile :Chained('user_detect') :PathPart('profile') :Args(0) {
    my ($self, $c) = @_;

    $c->stash->{template} = 'user/profile.tt';
}

1;

うーん、微妙w

:Chained('/') :PathPart('')

はあんまりやらないほうがよさげ。

by typester / at 2006-09-02T22:13:00 / perl · catalyst / Comment

勝ちゲームで中里キター。

by typester / at 2006-09-02T21:07:00 / baseball / Comment

Chainedアクションを覚えた

便利ねー。これで Plugin::Flavour の半分はいらなくなったから削ってシンプルにしようかと思う。

CaptureArgsやArgsをRegexで指定できたらもっとあついなぁ。

引数の数は同じだけど振り分けられる的な。

by typester / at 2006-09-02T16:29:00 / perl · catalyst / Comment

diigo

diigo ったのが del.icio.us にポストされないのは del.icio.us のAPIがかわったのにdiigoが対応してないためらしい。田中さんに教えてもらった。

おしいなぁdiigo。

今まで使っていたサービスにもクロスポストできる機能というのは、ためしに使ってみても良いな感が相当出るのでかなり重要。

diigoの完成度がたかければ良いけど、今の状態じゃdel.icio.usに戻るかということになっちゃうよなぁ。

コンセプトは良いだけに本当に惜しい。

by typester / at 2006-09-02T14:04:00 / life · web / Comment

Text::Tags::Parser

いつも名前忘れるなぁ。

by typester / at 2006-09-02T12:42:00 / perl / Comment

出社。

by typester / at 2006-09-02T09:47:00 / life / Comment

あー、今日diigoったやつ、deliciousにとんでねーー。気がする。

うーむ信用ならねぇなぁ。もどろうかな。

by typester / at 2006-09-02T01:36:00 / life / Comment

退社。

by typester / at 2006-09-02T00:54:00 / life / Comment