This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use feature qw( say ); | |
| use Web::Scraper; | |
| use URI; | |
| use Acme::CPANAuthors::Japanese; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use Data::Dumper; | |
| use Devel::Peek; | |
| use feature qw( say ); | |
| use Encode; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 638815a50913a983c67fe40efe83c00e86072be7 Mon Sep 17 00:00:00 2001 | |
| From: Masahiro Chiba <[email protected]> | |
| Date: Sun, 4 Oct 2009 03:37:45 +0900 | |
| Subject: [PATCH] add sendfile impl | |
| --- | |
| lib/Plack/Server/Apache2.pm | 7 ++++++- | |
| 1 files changed, 6 insertions(+), 1 deletions(-) | |
| diff --git a/lib/Plack/Server/Apache2.pm b/lib/Plack/Server/Apache2.pm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Plack::Middleware::Sendfile; | |
| use strict; | |
| use warnings; | |
| use base qw( Plack::Middleware ); | |
| use IO::File::WithPath; | |
| sub call { | |
| my $self = shift; | |
| my $env = shift; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/Plack/Server/Apache2.pm b/lib/Plack/Server/Apache2.pm | |
| index f2d80d0..d56b3c9 100644 | |
| --- a/lib/Plack/Server/Apache2.pm | |
| +++ b/lib/Plack/Server/Apache2.pm | |
| @@ -58,7 +58,19 @@ sub handler { | |
| $r->status($res->[0]); | |
| # TODO $r->sendfile support? | |
| - Plack::Util::foreach($res->[2], sub { $r->puts(@_) }); | |
| + my $puts_cb; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: t/06request_decode.t | |
| =================================================================== | |
| --- t/06request_decode.t (revision 0) | |
| +++ t/06request_decode.t (revision 0) | |
| @@ -0,0 +1,44 @@ | |
| +#!/usr/bin/env perl | |
| + | |
| +use strict; | |
| +use warnings; | |
| +use Test::More tests => 3 * 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Plaxy; | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use Plack::Request; | |
| use Plack::Response; | |
| use LWP; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Plack::Builder; | |
| { | |
| package Hoge; | |
| sub new { | |
| bless [1] => shift; | |
| } | |
| sub getline { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!perl | |
| use strict; | |
| use warnings; | |
| use AE; | |
| use Coro::AnyEvent; | |
| use Coro::Timer; | |
| my $timer = AE::timer 0, 1, sub { | |
| Coro::Timer::sleep 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global: | |
| dest_dir: /var/www/example/ | |
| work_dir: dummy | |
| assets_path: /path/to/archer_assets/ | |
| tasks: | |
| init: | |
| - module: Exec::Local | |
| name: stash save | |
| config: |
OlderNewer