Changeset 11934 for lang/perl/Moobal

Show
Ignore:
Timestamp:
05/18/08 22:50:59 (7 years ago)
Author:
daisuke
Message:

fix constructor

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Moobal/trunk/lib/Moobal/Role/ClientHTTP.pm

    r11724 r11934  
    109109 
    110110around 'new'  => sub { 
    111     my ($next, $service, $sock, $selector_svc) = @_; 
    112  
    113     my $socket = Moobal::Socket->new( $sock ); 
    114     $socket->state('reading_headers'); 
    115     $socket->watch_read(1); 
     111    my $next = shift; 
     112    my $self = $next->(@_); 
     113 
     114    my $danga_socket = $self->danga_socket; 
    116115     
    117     $next->( service => $service, socket => $socket, selector_svc => $selector_svc ); 
     116    $danga_socket->state('reading_headers'); 
     117    $danga_socket->watch_read(1); 
     118 
     119    return $self; 
    118120}; 
    119121