AnyEvent-HTTPD-ExtDirect
view release on metacpan or search on metacpan
lib/AnyEvent/HTTPD/ExtDirect.pm view on Meta::CPAN
for my $var ( qw/ router_class eventprovider_class / ) {
my $method = "${var}_anyevent";
$config->$method( delete $arg{$var} ) if exists $arg{$var};
}
# AnyEvent::HTTPD wants only IP addresses
$arg{host} = '127.0.0.1' if $arg{host} =~ /localhost/io;
my $self = $class->SUPER::new(%arg);
$self->config($config);
$self->api($api);
return $self;
}
### PUBLIC INSTANCE METHOD ###
#
# Run the server
lib/AnyEvent/HTTPD/ExtDirect.pm view on Meta::CPAN
my ($self) = @_;
my $config = $self->config;
$self->set_callbacks(
api_path => $config->api_path,
router_path => $config->router_path,
poll_path => $config->poll_path,
);
$self->SUPER::run();
}
### PUBLIC INSTANCE METHOD ###
#
# Handle Ext.Direct API calls
#
sub handle_api {
my ($self, $req) = @_;
( run in 1.151 second using v1.01-cache-2.11-cpan-49f99fa48dc )