Changeset 11800

Show
Ignore:
Timestamp:
05/18/08 00:26:28 (5 years ago)
Author:
yappo
Message:

add host attribute on ServerSimple?

Files:
1 modified

Legend:

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

    r11686 r11800  
    55use HTTP::Server::Simple 0.33; 
    66use HTTP::Server::Simple::CGI; 
     7 
     8has host => ( 
     9    is      => 'rw', 
     10    isa     => 'Str', 
     11    default => '127.0.0.1', 
     12); 
    713 
    814has port => ( 
     
    1521    my ($self, ) = @_; 
    1622 
    17     Moose::Meta::Class 
     23    my $server = Moose::Meta::Class 
    1824        ->create_anon_class( 
    1925            superclasses => ['HTTP::Server::Simple::CGI'], 
     
    2733        )->new( 
    2834            $self->port 
    29         )->run; 
     35        ); 
     36    $server->host($self->host); 
     37    $server->run; 
    3038} 
    3139