Catalyst::Plugin::XFramework

なんか流行ってるらしい!

package Catalyst::Plugin::XFramework;

sub finalize {
    my $c = shift;

    $c->res->header('X-Framework' => 'Catalyst/'.$c->version);
    $c->NEXT::finalize(@_);
}

1;

こんな感じか。

$ HEAD http://localhost:3000/
200 OK
Connection: close
Date: Fri, 09 Dec 2005 16:43:26 GMT
Content-Length: 10981
Content-Type: application/xhtml+xml; charset=utf-8
Last-Modified: Fri, 09 Dec 2005 16:31:19 GMT
Client-Date: Fri, 09 Dec 2005 16:43:26 GMT
Client-Peer: 127.0.0.1:3000
Client-Response-Num: 1
Status: 200
X-Catalyst: 5.62
X-Framework: Catalyst/5.62