Skip Menu |

This queue is for tickets about the MojoX-Renderer-TT CPAN distribution.

Report information
The Basics
Id: 61065
Status: resolved
Priority: 0/
Queue: MojoX-Renderer-TT

People
Owner: Nobody in particular
Requestors: GMORTEN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.40
Fixed in: (no value)



Subject: Test::Mojo can't find .tt templates
use Test::Mojo; $t->get_ok('/test1')->status_is(200,'got 200 from route with .ep template'); $t->get_ok('/test2')->status_is(200,'got 200 from route with .tt template'); these trivial routes are identical (details below) except that the 1st uses a .ep template and the 2nd uses a .tt template. both routes work correctly via a web browser through the standalone server on port 3000. when run from main dir via "perl -I./lib t/basic.t" OR via the generated Makefile, the 1st test pases but the 2nd one returns a 500 w/ "error Mojolicious::Controller:179 [14789]: file error - templates/example/test2.html.tt: No such file or directory" in development.log in startup: $self->plugin('tt_renderer'); my $r = $self->routes; $r->route('/test1')->to('example#test1'); $r->route('/test2')->to('example#test2'); in Example.pm: sub test1 { shift->render; } sub test2 { shift->render; } in templates/example/test1.html.ep yeah ok, in ep in templates/example/test2.html.tt yeah ok, in tt
correction: after regenerating Makefile, "make test" does pass. also, running the app with the "test" command "./script/ttest test" works. the only case where it doesn't pass is running the .t file directly via "perl -I./lib t/basic.t" i'm not still sure this is really a bug, although i don't understand why the renderer finds the .ep file but not the .tt file in this case jay On Sat Sep 04 11:19:13 2010, GMORTEN wrote: Show quoted text
> use Test::Mojo; > $t->get_ok('/test1')->status_is(200,'got 200 from route with .ep
template'); Show quoted text
> $t->get_ok('/test2')->status_is(200,'got 200 from route with .tt
template'); Show quoted text
> > these trivial routes are identical (details below) except that the 1st > uses a .ep template and the 2nd uses a .tt template. both routes work > correctly via a web browser through the standalone server on port 3000. > > when run from main dir via "perl -I./lib t/basic.t" OR via the generated > Makefile, the 1st test pases but the 2nd one returns a 500 w/ "error > Mojolicious::Controller:179 [14789]: file error - > templates/example/test2.html.tt: No such file or directory" in > development.log > > in startup: > $self->plugin('tt_renderer'); > my $r = $self->routes; > $r->route('/test1')->to('example#test1'); > $r->route('/test2')->to('example#test2'); > > in Example.pm: > sub test1 { > shift->render; > } > > sub test2 { > shift->render; > } > > in templates/example/test1.html.ep > yeah ok, in ep > in templates/example/test2.html.tt > yeah ok, in tt
Subject: Re: [rt.cpan.org #61065] Test::Mojo can't find .tt templates
Date: Sun, 5 Sep 2010 13:33:16 -0700
To: bug-MojoX-Renderer-TT [...] rt.cpan.org
From: Ask Bjørn Hansen <ask [...] perl.org>
On Sep 5, 2010, at 13:26, jay mortensen via RT wrote: Show quoted text
> i'm not still sure this is really a bug, although i don't understand why > the renderer finds the .ep file but not the .tt file in this case
I think it's just how the search paths for the templates are setup.
Thanks for following up by the way!