App-htmlcat
view release on metacpan or search on metacpan
lib/App/htmlcat.pm view on Meta::CPAN
};
$self->{in}->on_read($self->_on_read_cb);
};
} elsif ($env->{PATH_INFO} eq '/css') {
return [ 200, [ 'Content-Type' => 'text/css' ], [ $self->{ansi}->css ] ];
} elsif ($env->{PATH_INFO} eq '/js') {
return [ 200, [ 'Content-Type' => 'text/javascript' ], [ get_data_section('js') ] ];
} elsif ($env->{PATH_INFO} eq '/') {
return [ 200, [ 'Content-Type' => 'text/html; charset=utf-8' ], [ get_data_section('html') ] ];
} else {
return [ 404, [], [] ];
}
};
}
sub run {
my $self = shift;
my $runner = Plack::Runner->new(app => $self->as_psgi);
$runner->parse_options(
'--env' => 'production',
'--port' => _empty_port(),
( run in 1.802 second using v1.01-cache-2.11-cpan-39bf76dae61 )