App-TemplateServer

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.03    18 January 2008
        - fix the docs for instantiating a class with a custom method from data
        - make the code for that actually work (whoops; test added :)
        - bump required version of Moose

0.02    15 January 2008
        - docroot is an arrayref now
        - no need to specify provider as App::TemplateServer::Provider::,
          it's implied
        - unescape URI (server/foo%20bar.tt => "foo bar.tt")
        - add Null provider (for testing)

0.01    14 January 2008
        - very first version
          released upon the world
          with much rejoicing

lib/App/TemplateServer.pm  view on Meta::CPAN

method _mk_context($req) {
    return App::TemplateServer::Context->new(
        data    => $self->_data,
        request => $req,
        server  => $self->_daemon,
    );
};

method _render_template($req) {
    my $context = $self->_mk_context($req);
    my $template = uri_unescape($req->uri->path);
    $template =~ s{^/}{};
    my $content = $self->provider->render_template($template, $context);
    return _success($content);
};

method _render_index($req) {

    my $index = App::TemplateServer::Page::Index->new(
        provider => $self->provider,
    );



( run in 0.799 second using v1.01-cache-2.11-cpan-5467b0d2c73 )