HEAD の Plack::Request では Hash::MultiValues が導入されてる。Hash::MultiValue は多値をストアできるハッシュ風オブジェクト。 use Plack::Request; use Test::More; my $r = Plack::Request->new({ QUERY_STRING => 'bar=aaa&bar=bbb', REQUEST_METHOD => 'GET', }); is_deeply $r->parameters->{bar}, [qw/aaa bbb/]; みたいなコードが昔はとおってたけど、HEAD だととおらない。 なんでかというと、Plack::Request->parameters->{...} が str or arrayref をかえすのがよくないからなおしたというはなし(see http://bulk
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. I am pleased to announce that i've just shipped Plack 0.99_01 to CPAN, the first dev release towards Plack 1.0. What's New? There's been lots of refactorings, renames and changes but first of all, this 1.0 release should be 99.9% transparent to the end users, and they don't need to change anything wrt how to use
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. Short answer if you come from Google: Plack is a toolkit containing middleware, helpers and web server adapters to run PSGI. Plack is NOT a web server but it's rather a "web server interface" which means if you want to run you PSGI application on any web servers, look at Plack to find handlers. The namespace "Pl
PSGI/Plackにおいて、非同期にレスポンスが返せるstreamingという仕様/機能が追加されました。 PSGI/Plack streaming is now complete これを使うと、streamingをサポートしたサーバから非同期/nonblockingにhttpやGearmanを利用して外部へ問い合わせを行い、その結果をレスポンスしたりできます。 また、これがPlackで既に実装済みなので、非常に短いコードでサーバの実装ができちゃいます。 すばらしいですね。 すでにmiyagawaさんが、この機能を利用した非同期Web Framework「Tatsumaki」を書かれています。 イベントを扱う部分が隠蔽されているので、これを使うとさらに簡単に実装できます。 すばらしすぐる。 ここでは、簡単に外部へAnyEvent::HTTPを用いて、HTTPリクエストを行うサンプルを書い
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. In the last couple of (or even more :) days Yuval and I have been endlessly discussing what the asynchronous response API would look like in PSGI applications. And that was also becoming one of the most frequently asked questions on my side, since many people from AnyEvent, POE and perlbal (Danga::Socket) land a
HTTP::Engine 0.03001 has streaming response now / multipart/mixedなストリームをHTTP::Engine/Plackでpushする thanks many ideas from yusukebe, mattn, miyagawa. I created a streaming response support for HTTP::Engine. it was a too easy hack. example here [ゆ]: multipart/mixedなストリームをPlack/PSGIでpushする みて、HTTP::Engineの上で動くかと思ったけど全然動かなかったので、HTTP::Engine側で対応して動くようにしました。 http://github.com/yappo/fast-twitter-stream IO
サキとは彼女の自宅近く、湘南台駅前のスーパーマーケットで待ち合わせをした。彼女は自転車で後から追いつくと言い、僕は大きなコインパーキングへ車を停めた。煙草を一本吸ってからスーパーマーケットへ向かうと、ひっきりなしに主婦的な女性かおばあちゃんが入り口を出たり入ったりしていた。時刻は午後5時になる。時計から目を上げると、待たせちゃったわねと大して悪びれてない様子でサキが手ぶらでやってきた。 お礼に料理を作るとはいえ、サキの家には食材が十分足りていないらしく、こうしてスーパーマーケットに寄ることになった。サキは野菜コーナーから精肉コーナーまで、まるで優秀なカーナビに導かれるように無駄なく点検していった。欲しい食材があると、2秒間程度それらを凝視し、一度手に取ったじゃがいもやら豚肉やらを迷うことなく僕が持っているカゴに放り込んだ。最後にアルコール飲料が冷やされている棚の前へ行くと、私が飲むからとチ
WebGUI is an Apache mod_perl application. Not just any mod_perl application; reputedly the most deployed mod_perl application on the planet. You'd be forgiven for thinking that we love Apache. And we do. Mostly. But you see mod_perl is an overly zealous lover. Every intimate phase of the Apache request cycle is offered up to your eager Perl embrace. Sure, you have to learn a few new tricks to get
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
最近熱いPSGI/Packですが、サーバのStandaloneではかなり高速なパフォーマンスが出ているらしく、試してみようと思った所、Windowsでは動かない箇所があったのでいろいろやった作業履歴。 まず、Standaloneサーバが速いと言われる理由としてsendfile(2)を使っているのですが、Windowsにはsendfile(2)がありません。しかしソケット前提であるならばTransmitFileというAPIがあります。 sendfile(2)と同じようにZeroCopyでファイルから指定ディスクリプタに流し込むAPIです。 Plackが使っているSys::Sendfileに対してこのAPIを使う様にWindowsポーティングしました。 Sys::Sendfileのauthorにもpull requestを送りました。次にPlackにてWindowsで使えないAPIを叩いている
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. It's been a new autumn break, so called Silver Week in Japan and the hacking has been a little calmed down. We're getting close to ship PSGI draft and Plack core distribution to CPAN, but here are few things to clear up and other things to mention: CGI.pm patch has been updated. While markstos is away for his va
Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at
I am hoping to get the HTTP::Parser module to be much more functional that it currently is. I plan to look closely at both HTTP::Parser::XS and Plack::HTTPParser::PP to see how I can best do this, so that the code is useful to the most people. Ideally, I'd like it to be a drop-in replacement for using the several other choices. This will all be somewhat dependent on how strongly the original autho
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. Daisuke Murase made Plack::Impl::Danga::Socket, the standalone web server that runs PSGI application. I made Perlbal::Plugin::PSGI that is a Perlbal plugin so you can combine with other Perlbal plugins. They both work in a single threaded Danga::Socket or Perlbal server process so your application is not suppose
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. Middleware is some great (but sometimes abused) features in Python's WSGI and Ruby's Rack. HTTP::Engine also had this middleware concept and had some great "plugins". So it's time to write the new middleware framework for PSGI and Plack. In PSGI, middleware is just a PSGI application thatdoes the both applicatio
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く