NAME
EntityModel::Web::NaFastCGI - website support for EntityModel
VERSION
version 0.002
SYNOPSIS
use
IO::Async::Loop;
use
EntityModel;
my
$loop
= IO::Async::Loop->new;
my
$model
= EntityModel->new->load_from(
JSON
=> {
file
=>
'model.json'
});
my
$tmpl
= EntityModel::Template->new;
$tmpl
->process_template(\
'[% PROCESS TemplateDefs.tt2 %]'
);
my
$fcgi
= EntityModel::Web::NaFastCGI->new(
model
=>
$model
,
context_args
=> [
template
=>
$tmpl
,
],
show_timing
=> 1,
);
$loop
->add(
$fcgi
);
$fcgi
->
listen
(
service
=> 9738,
on_listen_error
=>
sub
{
die
"Listen failed: @_"
; },
on_resolve_error
=>
sub
{
die
"Resolve failed: @_"
; }
);
$loop
->loop_forever;
DESCRIPTION
configure
on_request
AUTHOR
Tom Molesworth <cpan@entitymodel.com>
LICENSE
Copyright Tom Molesworth 2011. Licensed under the same terms as Perl itself.