Changeset 11128

Show
Ignore:
Timestamp:
05/05/08 00:48:40 (6 years ago)
Author:
yappo
Message:

using Class::Component 0.17 feature

Location:
lang/perl/HTTP-Engine/trunk/lib/HTTP
Files:
2 added
7 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine.pm

    r10858 r11128  
    1515use HTTP::Engine::Response; 
    1616 
    17 __PACKAGE__->load_components(qw/Plaggerize Autocall::InjectMethod/); 
     17__PACKAGE__->load_components(qw/Plaggerize Moosenize Autocall::InjectMethod/); 
    1818 
    1919sub new { 
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Plugin/Interface.pm

    r10816 r11128  
    22use strict; 
    33use warnings; 
    4 use base qw( HTTP::Engine::Plugin Class::Accessor::Fast ); 
     4use base qw( HTTP::Engine::Plugin HTTP::Engine::Role::Interface Class::Accessor::Fast ); 
    55__PACKAGE__->mk_accessors(qw/ read_position read_length /); 
    66 
     
    1717use HTTP::Engine::Request::Upload; 
    1818 
     19 
    1920sub initialize :Hook { 
    2021    my($self, $c) = @_; 
     
    2324} 
    2425 
    25 sub prepare_connection :InterfaceMethod { 
     26sub prepare_connection { 
    2627    my($self, $c) = @_; 
    2728 
     
    3738} 
    3839 
    39 sub prepare_query_parameters :InterfaceMethod { 
     40sub prepare_query_parameters { 
    4041    my($self, $c) = @_; 
    4142    my $query_string = $c->env->{QUERY_STRING}; 
     
    5253} 
    5354 
    54 sub prepare_headers :InterfaceMethod { 
     55sub prepare_headers { 
    5556    my($self, $c) = @_; 
    5657 
     
    6364} 
    6465 
    65 sub prepare_cookie :InterfaceMethod { 
     66sub prepare_cookie { 
    6667    my($self, $c) = @_; 
    6768 
     
    7172} 
    7273 
    73 sub prepare_path :InterfaceMethod { 
     74sub prepare_path { 
    7475    my($self, $c) = @_; 
    7576 
     
    108109} 
    109110 
    110 sub prepare_body :InterfaceMethod { 
     111sub prepare_body { 
    111112    my($self, $c) = @_; 
    112113 
     
    141142} 
    142143 
    143 sub prepare_body_parameters :InterfaceMethod { 
     144sub prepare_body_parameters { 
    144145    my($self, $c) = @_; 
    145146    $c->req->body_parameters($c->req->{_body}->param); 
    146147} 
    147148 
    148 sub prepare_parameters :InterfaceMethod { 
     149sub prepare_parameters { 
    149150    my($self, $c) = @_; 
    150151 
     
    173174} 
    174175 
    175 sub prepare_uploads :InterfaceMethod { 
     176sub prepare_uploads { 
    176177    my($self, $c) = @_; 
    177178 
     
    201202 
    202203# output 
    203 sub finalize_cookies :InterfaceMethod { 
     204sub finalize_cookies { 
    204205    my($self, $c) = @_; 
    205206 
     
    223224} 
    224225 
    225 sub finalize_output_headers :InterfaceMethod { 
     226sub finalize_output_headers { 
    226227    my($self, $c) = @_; 
    227228 
     
    231232} 
    232233 
    233 sub finalize_output_body :InterfaceMethod { 
     234sub finalize_output_body { 
    234235    my($self, $c) = @_; 
    235236    my $body = $c->res->body; 
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Plugin/Interface/Adaptor.pm

    r10473 r11128  
    1111} 
    1212 
    13 sub run : Method { $_[0]->adaptee->run(@_) } 
     13sub run { $_[0]->adaptee->run(@_) } 
    1414 
    15 sub prepare_request : InterfaceMethod { $_[0]->adaptee->prepare_request(@_) } 
    16 sub prepare_connection : InterfaceMethod { $_[0]->adaptee->prepare_connection(@_) } 
    17 sub prepare_query_parameters : InterfaceMethod { $_[0]->adaptee->prepare_query_parameters(@_) } 
    18 sub prepare_headers : InterfaceMethod { $_[0]->adaptee->prepare_headers(@_) } 
    19 sub prepare_cookie : InterfaceMethod { $_[0]->adaptee->prepare_cookie(@_) } 
    20 sub prepare_path : InterfaceMethod { $_[0]->adaptee->prepare_path(@_) } 
    21 sub prepare_body : InterfaceMethod { $_[0]->adaptee->prepare_body(@_) } 
    22 sub prepare_body_parameters : InterfaceMethod { $_[0]->adaptee->prepare_body_parameters(@_) } 
    23 sub prepare_parameters : InterfaceMethod { $_[0]->adaptee->prepare_parameters(@_) } 
    24 sub prepare_uploads : InterfaceMethod { $_[0]->adaptee->prepare_uploads(@_) } 
     15sub prepare_request { $_[0]->adaptee->prepare_request(@_) } 
     16sub prepare_connection { $_[0]->adaptee->prepare_connection(@_) } 
     17sub prepare_query_parameters { $_[0]->adaptee->prepare_query_parameters(@_) } 
     18sub prepare_headers { $_[0]->adaptee->prepare_headers(@_) } 
     19sub prepare_cookie { $_[0]->adaptee->prepare_cookie(@_) } 
     20sub prepare_path { $_[0]->adaptee->prepare_path(@_) } 
     21sub prepare_body { $_[0]->adaptee->prepare_body(@_) } 
     22sub prepare_body_parameters { $_[0]->adaptee->prepare_body_parameters(@_) } 
     23sub prepare_parameters { $_[0]->adaptee->prepare_parameters(@_) } 
     24sub prepare_uploads { $_[0]->adaptee->prepare_uploads(@_) } 
    2525 
    26 sub finalize_cookies : InterfaceMethod { $_[0]->adaptee->finalize_cookies(@_) } 
    27 sub finalize_output_headers : InterfaceMethod { $_[0]->adaptee->finalize_output_headers(@_) } 
    28 sub finalize_output_body : InterfaceMethod { $_[0]->adaptee->finalize_output_body(@_) } 
     26sub finalize_cookies { $_[0]->adaptee->finalize_cookies(@_) } 
     27sub finalize_output_headers { $_[0]->adaptee->finalize_output_headers(@_) } 
     28sub finalize_output_body { $_[0]->adaptee->finalize_output_body(@_) } 
    2929 
    30301; 
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Plugin/Interface/FCGI.pm

    r10501 r11128  
    77use FCGI; 
    88 
    9 sub run :Method { 
     9sub run { 
    1010    my ( $self, $class, $listen, ) = @_; 
    1111 
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Plugin/Interface/ServerSimple.pm

    r10762 r11128  
    55use HTTP::Server::Simple 0.33; 
    66 
    7 sub run: Method { 
     7sub run  { 
    88    my ($self, $c) = @_; 
    99    my $port = $self->config->{port} || '80'; 
     
    1414} 
    1515 
    16 sub finalize_output_headers : InterfaceMethod { 
     16sub finalize_output_headers { 
    1717    my ( $self, $c ) = @_; 
    1818 
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Plugin/Interface/Standalone.pm

    r10762 r11128  
    3535} 
    3636 
    37 sub finalize_output_headers :InterfaceMethod { 
     37sub finalize_output_headers { 
    3838    my($self, $c) = @_; 
    3939 
     
    4848} 
    4949 
    50 sub run :Method { 
     50sub run { 
    5151    my($self, $c) = @_; 
    5252    my $host = $self->config->{host} || ''; 
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Plugin/Interface/Test.pm

    r10552 r11128  
    66use HTTP::Request::AsCGI; 
    77 
    8 sub run :Method { 
     8sub run { 
    99    my($senf, $c, $request, $env) = @_; 
    1010    $env ||= \%ENV;