Skip Menu |

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

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

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

Bug Information
Severity: (no value)
Broken in: 1.0
Fixed in: (no value)



Subject: Tests fail on Strawberry Perl 5.10.1.2

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #65282] Tests fail on Strawberry Perl 5.10.1.2
Date: Mon, 31 Jan 2011 03:41:54 -0800
To: "bug-MojoX-Renderer-TT [...] rt.cpan.org" <bug-MojoX-Renderer-TT [...] rt.cpan.org>
From: Ask Bjørn Hansen <ask [...] perl.org>
Hi, I don't have a windows system to help debug this (or any experience doing anything on windows more sophisticated than clicking links in a web browser for that matter) -- but patches welcome!
It looks like it tries to load the templates from disk instead from __DATA__. Not sure if this isn't supposed to work on Windows though.
I've been able to fix a couple of the issues showing up, but not all of them. In MojoX::Renderer::TT on line 155 you assume unix paths. Windows uses backward slashes. This line should fix that: my ($t) = ($path =~ m{templates[\/|\\](.*)$}); However, the include and wrapper tests still seem to fail for me. I assume it's due to a path-style not compatible with Windows. But I've got no clue where to look next. Any pointers in the right direction would be nice :-).
Even better, use File::Spec again: my $t = (File::Spec->splitpath($path))[2]; Looking through the history of the file, why did you fall back to a regular expression? About the INCLUDE and WRAPPER tests. If I remove the path-part of it and rename includes/include.inc to include2.inc for example, the tests pass without any problems. So now I'm wondering if either Mojo::Command->get_all_data (or get_data) is at fault or perhaps it's MojoX::Renderer::TT?
I tried running the Mojolicious website (a lite app) and it had no issues rendering __DATA__ templates that contain a path-part. So I guess it's Template-Toolkit not playing nice with __DATA__ templates that are not on the 'root' level.
On Thu Feb 03 05:32:36 2011, CKRAS wrote: Show quoted text
> Even better, use File::Spec again: > > my $t = (File::Spec->splitpath($path))[2]; > > Looking through the history of the file, why did you fall back to a > regular expression?
vti did that. I think to support template/some/other/dir/file.tt ? I just changed the regexp for now so I can make a quick release. Using splitpath/splitdir does seem more appropriate but I'm not sure the tests are covering this properly. Show quoted text
> About the INCLUDE and WRAPPER tests. If I remove the path-part of it and > rename includes/include.inc to include2.inc for example, the tests pass > without any problems. > > So now I'm wondering if either Mojo::Command->get_all_data (or get_data) > is at fault or perhaps it's MojoX::Renderer::TT?
Can you make an issue for this on github?