yappoの日記

2008-05-13

middleware ?

17:49

たとえば

use HTTP::Engine::MiddleWare qw( ModuleReload DebugScreen );


HTTP::Engine::MiddleWare->new(
    interface => $interface,
    request_handler => sub {
        my $c = shift;
        # do your work.
    },
);

fmmmm


my $poe1 = HTTP::Engine->new(
    interface       => {
        module => 'POE',
        args    => $args,
        request_handler => sub { },
    },
    middle_wares => [qw/ModuleReload DebugScreen/],
);

my $poe2 = HTTP::Engine->new(
    interface       => {
        module => 'POE',
        args    => $args,
        request_handler => sub { },
    },
    middle_wares => [qw/ModuleReload DebugScreen MobileAttribute /],
);

POE::Kernel->run;