Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dancer-Plugin-SiteMap CPAN distribution.

Report information
The Basics
Id: 70671
Status: resolved
Priority: 0/
Queue: Dancer-Plugin-SiteMap

People
Owner: Nobody in particular
Requestors: stephen [...] makessense.co.uk
Cc:
AdminCc:

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



Subject: Working with Mason2
Using latest version on Ubuntu. Sitemap appears to have problems when template is no TT package Simple; use Dancer ':syntax'; use Dancer::Plugin::SiteMap; use Dancer::Template::Mason2; our $VERSION = '0.1'; get '/' => sub { template 'index'; }; true; && config.yml : template: "mason2" causes: Bareword "settings" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 5. Bareword "charset" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 5. Bareword "request" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 7. Bareword "uri_base" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 7. Bareword "request" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 12. Bareword "uri_base" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 12. Bareword "content" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 17. Bareword "dancer_version" not allowed while "strict subs" in use at /home/stephen/DancerTest/Simple/views/layouts/main.tt line 19. /home/stephen/DancerTest/Simple/views/layouts/main.tt around line 5 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-type" content="text/html; charset=<% settings.charset %>" /> 6 <title>Simple</title> 7 <link rel="stylesheet" href="<% request.uri_base %>/css/style.css" /> 8
Hi, Thanks for your Bug report, I've had a look at the code and there does seem to be some TT specific stuff in there that shouldn't be. When I wrote this Plugin there were only the 2 template engines for Dancer. Obviously time for an update! I don't know much about Mason, could you post your main.mc and index.mc so I can see a working example of how variables are accessed etc. please? Would be most helpful :-) Anyway, thanks again and rest assured I'll do my best to rectify the issue ASAP. Cheers, JamesR On Thu Sep 01 14:07:49 2011, StevieP wrote: Show quoted text
> > Using latest version on Ubuntu. > > Sitemap appears to have problems when template is no TT > > package Simple; > use Dancer ':syntax'; > use Dancer::Plugin::SiteMap; > use Dancer::Template::Mason2; > > our $VERSION = '0.1'; > > get '/' => sub { > template 'index'; > }; > > true; > > && > > config.yml : > > template: "mason2" > > causes: > > Bareword "settings" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 5. > Bareword "charset" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 5. > Bareword "request" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 7. > Bareword "uri_base" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 7. > Bareword "request" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 12. > Bareword "uri_base" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 12. > Bareword "content" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 17. > Bareword "dancer_version" not allowed while "strict subs" in use at > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 19. > /home/stephen/DancerTest/Simple/views/layouts/main.tt around line 5 > > 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > 3 <html xmlns="http://www.w3.org/1999/xhtml"> > 4 <head> > 5 <meta http-equiv="Content-type" content="text/html; charset=<% > settings.charset %>" /> > 6 <title>Simple</title> > 7 <link rel="stylesheet" href="<% request.uri_base %>/css/style.css" /> > 8 >
Subject: Re: [rt.cpan.org #70671] Working with Mason2
Date: Fri, 2 Sep 2011 10:19:59 +0100
To: bug-Dancer-Plugin-SiteMap [...] rt.cpan.org
From: Stephen Fenwick-Paul <stephen [...] makessense.co.uk>
Here they are - ta for looking into this. $ cat index.mc <p>Running with Mason</p> $ cat layouts/main.mc <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-type" content="text/html; charset=<% $.settings->{charset} %>" /> <title>Simple</title> <link rel="stylesheet" href="<% $.request->{uri_base} %>/css/style.css" /> </head> <body> <% $.content %> </body> </html> <%args> $.content $.request $.settings </%args> On Fri, Sep 2, 2011 at 10:08 AM, James Ronan via RT < bug-Dancer-Plugin-SiteMap@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=70671 > > > Hi, > > Thanks for your Bug report, I've had a look at the code and there does > seem to be some TT specific stuff in there that shouldn't be. When I > wrote this Plugin there were only the 2 template engines for Dancer. > Obviously time for an update! > > I don't know much about Mason, could you post your main.mc and index.mc > so I can see a working example of how variables are accessed etc. > please? Would be most helpful :-) > > Anyway, thanks again and rest assured I'll do my best to rectify the > issue ASAP. > > Cheers, > JamesR > > > > On Thu Sep 01 14:07:49 2011, StevieP wrote:
> > > > Using latest version on Ubuntu. > > > > Sitemap appears to have problems when template is no TT > > > > package Simple; > > use Dancer ':syntax'; > > use Dancer::Plugin::SiteMap; > > use Dancer::Template::Mason2; > > > > our $VERSION = '0.1'; > > > > get '/' => sub { > > template 'index'; > > }; > > > > true; > > > > && > > > > config.yml : > > > > template: "mason2" > > > > causes: > > > > Bareword "settings" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 5. > > Bareword "charset" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 5. > > Bareword "request" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 7. > > Bareword "uri_base" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 7. > > Bareword "request" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 12. > > Bareword "uri_base" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 12. > > Bareword "content" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 17. > > Bareword "dancer_version" not allowed while "strict subs" in use at > > /home/stephen/DancerTest/Simple/views/layouts/main.tt line 19. > > /home/stephen/DancerTest/Simple/views/layouts/main.tt around line 5 > > > > 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > 3 <html xmlns="http://www.w3.org/1999/xhtml"> > > 4 <head> > > 5 <meta http-equiv="Content-type" content="text/html; charset=<% > > settings.charset %>" /> > > 6 <title>Simple</title> > > 7 <link rel="stylesheet" href="<% request.uri_base %>/css/style.css" /> > > 8 > >
> > > >
Hi, Many thanks for that, I understand Mason a little now :-) Anyways, I've pushed a fix to the GitHub version: https://github.com/jamesronan/Dancer-Plugin-SiteMap So feel free to give that a go, I'm going to ball up a new dist version and get it on CPAN shortly. (It'll be v0.07) Thanks again for the bug report, feel free to drop me a line if you have suggestions for features/functionality that would make this Plugin better. Also, if you want to, feel free to give it a rating: http://cpanratings.perl.org/dist/Dancer-Plugin-SiteMap I welcome feedback, so Thanks! JamesR On Fri Sep 02 05:20:31 2011, StevieP wrote: Show quoted text
> Here they are - ta for looking into this. > > > $ cat index.mc > <p>Running with Mason</p> > > > $ cat layouts/main.mc > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-type" content="text/html; charset=<% > $.settings->{charset} %>" /> > <title>Simple</title> > <link rel="stylesheet" href="<% $.request->{uri_base} %>/css/style.css" /> > > </head> > <body> > <% $.content %> > </body> > </html> > > <%args> > $.content > $.request > $.settings > </%args>