Show
Ignore:
Timestamp:
11/30/08 22:20:45 (5 years ago)
Author:
yappo
Message:

fixed bug forget Types option

Location:
lang/perl/HTTP-Engine/branches/shika/lib/HTTP/Engine
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/branches/shika/lib/HTTP/Engine/Request.pm

    r25452 r25455  
    22use Shika; 
    33use HTTP::Headers::Fast; 
    4 use HTTP::Engine::Types::Core; 
     4use HTTP::Engine::Types::Core qw( Uri Handlers ); 
    55use URI::QueryParam; 
    66require Carp; # Carp->import is too heavy =( 
  • lang/perl/HTTP-Engine/branches/shika/lib/HTTP/Engine/Response.pm

    r25452 r25455  
    44use HTTP::Status (); 
    55use HTTP::Headers::Fast; 
    6 use HTTP::Engine::Types::Core; 
     6use HTTP::Engine::Types::Core qw( Handlers ); 
    77 
    88# Shika role merging is borked with attributes 
  • lang/perl/HTTP-Engine/branches/shika/lib/HTTP/Engine/Types/Core.pm

    r25454 r25455  
    2727            Shika::Util::load_class($module); 
    2828 
    29             return $module->new( %$args ); 
     29            $_[0] = $module->new( %$args ); 
    3030        }, 
    3131    }; 
     
    4545            $uri->query(undef); 
    4646            $uri->path($base); 
    47             URI::WithBase->new($_[0], $uri); 
     47            $_[0] = URI::WithBase->new($_[0], $uri); 
    4848        }, 
    4949    }; 
     
    5454 
    5555    coerce Header => +{ 
    56         ArrayRef => sub { HTTP::Headers->new( @{ $_[0] } ) }, 
    57         HashRef  => sub { HTTP::Headers->new( %{ $_[0] } ) }, 
     56        ArrayRef => sub { $_[0] = HTTP::Headers->new( @{ $_[0] } ) }, 
     57        HashRef  => sub { $_[0] = HTTP::Headers->new( %{ $_[0] } ) }, 
    5858    }; 
    5959}; 
     
    6161do { 
    6262    subtype Handler => \&Shika::Util::TypeConstraints::_CodeRef; 
    63     coerce Handler => +{ Str => sub { \&{$_[0]} } }; 
     63    coerce Handler => +{ Str => sub { $_[0] = \&{$_[0]} } }; 
    6464}; 
    6565