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: 93548
Status: rejected
Priority: 0/
Queue: Dancer-Plugin-SiteMap

People
Owner: Nobody in particular
Requestors: scopa90 [...] gmail.com
Cc:
AdminCc:

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



Subject: before_template_render not being called if sitemap used as url
Date: Wed, 5 Mar 2014 16:25:30 +0000
To: bug-Dancer-Plugin-SiteMap [...] rt.cpan.org
From: Keith Jones <scopa90 [...] gmail.com>
Hello first of all a small demo: ---- app.pl ---- use Dancer; use Dancer::Plugin::SiteMap; use Template; hook before_template_render => sub { my $tokens = shift; $tokens->{'demo'} = 'before_template_render called'; }; get '/' => sub { template 'index.tt'; }; dance; ----end of app.pl---- ---- index.tt ---- <% demo %> ---- end of index.tt --- if you bring app,pl up then a call to http://0.0.0.0:3000 will show: [25950] core @0.000316> request: GET / from 127.0.0.1 in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 56 [25950] core @0.001078> [hit #7]Trying to match 'GET /' against /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 [25950] core @0.001441> [hit #7]Trying to match 'GET /' against /^\/sitemap$/ (generated from '/sitemap') in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 [25950] core @0.001760> [hit #7]Trying to match 'GET /' against /^\/$/ (generated from '/') in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 [25950] core @0.002043> [hit #7] --> got 1 in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 [25950] core @0.003189> [hit #7]entering before_template_render hook in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Hook.pm l. 58 [25950] core @0.006544> [hit #7]response: 200 in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 And 'before_template_render called' will be displayed. If you try http://0.0.0.0:3000/sitemap then you'll see: [25950] core @0.001133> [hit #8]Trying to match 'GET /sitemap' against /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 [25950] core @0.001508> [hit #8]Trying to match 'GET /sitemap' against /^\/sitemap$/ (generated from '/sitemap') in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 [25950] core @0.001807> [hit #8] --> got 1 in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 [25950] core @0.005524> [hit #8]response: 200 in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 And a blank screen - you'll also note that the before_template_render hook isn't called in the trace.
Hi Keith, Thanks for the bug report. The site map plugin currently puts out a very simple HTML sitemap wrapped in your app's layout. So a renderer is never applied as I've never needed one. You're point is however valid and I shall work up a fix shortly. I'll let you know when I've pushed a new version to CPAN. Thanks again, JamesR On Wed Mar 05 11:25:42 2014, scopa90@gmail.com wrote: Show quoted text
> Hello > > first of all a small demo: > > ---- app.pl ---- > use Dancer; > use Dancer::Plugin::SiteMap; > use Template; > > hook before_template_render => sub > { > my $tokens = shift; > $tokens->{'demo'} = 'before_template_render called'; > }; > > get '/' => sub > { > template 'index.tt'; > }; > > dance; > ----end of app.pl---- > > ---- index.tt ---- > <% demo %> > ---- end of index.tt --- > > if you bring app,pl up then a call to http://0.0.0.0:3000 will show: > [25950] core @0.000316> request: GET / from 127.0.0.1 in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 56 > [25950] core @0.001078> [hit #7]Trying to match 'GET /' against > /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > [25950] core @0.001441> [hit #7]Trying to match 'GET /' against > /^\/sitemap$/ (generated from '/sitemap') in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > [25950] core @0.001760> [hit #7]Trying to match 'GET /' against > /^\/$/ (generated from '/') in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > [25950] core @0.002043> [hit #7] --> got 1 in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 > [25950] core @0.003189> [hit #7]entering before_template_render hook > in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Hook.pm l. 58 > [25950] core @0.006544> [hit #7]response: 200 in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 > > And 'before_template_render called' will be displayed. > > If you try http://0.0.0.0:3000/sitemap then you'll see: > > [25950] core @0.001133> [hit #8]Trying to match 'GET /sitemap' > against /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > [25950] core @0.001508> [hit #8]Trying to match 'GET /sitemap' > against /^\/sitemap$/ (generated from '/sitemap') in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > [25950] core @0.001807> [hit #8] --> got 1 in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 > [25950] core @0.005524> [hit #8]response: 200 in > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 > > And a blank screen - you'll also note that the before_template_render > hook isn't called in the trace.
Having looked into this, before_template_render is a before hook which allows you to inject/mess with the tokens for the /template/. The /sitemap route has no template. It is merely some simple HTML wrapped in your /layout/. Therefore a call to /sitemap has no business invoking the before_template_render hook. It does however, and quite rightly, invoke the (before|after)_layout_render hooks. I've copied your example app and I get "before_template_render called" when I hit the '/' route, and I get the default sitemap when I hit '/sitemap'. Unfortunately I'm not sure what else I can do? From what you've said the sitemap isn't being generated or is crashing, but I can't replicate it. If you can give me any more information or have any more specific questions, I'll do my best to help you out. I'll leave this ticket open for a week or so to give you a chance to respond. Cheers, JamesR On Wed Mar 05 12:04:17 2014, JAMESR wrote: Show quoted text
> Hi Keith, > > Thanks for the bug report. The site map plugin currently puts out a > very simple HTML sitemap wrapped in your app's layout. > So a renderer is never applied as I've never needed one. > > You're point is however valid and I shall work up a fix shortly. > > I'll let you know when I've pushed a new version to CPAN. > > Thanks again, > JamesR > > > On Wed Mar 05 11:25:42 2014, scopa90@gmail.com wrote:
> > Hello > > > > first of all a small demo: > > > > ---- app.pl ---- > > use Dancer; > > use Dancer::Plugin::SiteMap; > > use Template; > > > > hook before_template_render => sub > > { > > my $tokens = shift; > > $tokens->{'demo'} = 'before_template_render called'; > > }; > > > > get '/' => sub > > { > > template 'index.tt'; > > }; > > > > dance; > > ----end of app.pl---- > > > > ---- index.tt ---- > > <% demo %> > > ---- end of index.tt --- > > > > if you bring app,pl up then a call to http://0.0.0.0:3000 will show: > > [25950] core @0.000316> request: GET / from 127.0.0.1 in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 56 > > [25950] core @0.001078> [hit #7]Trying to match 'GET /' against > > /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > > [25950] core @0.001441> [hit #7]Trying to match 'GET /' against > > /^\/sitemap$/ (generated from '/sitemap') in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > > [25950] core @0.001760> [hit #7]Trying to match 'GET /' against > > /^\/$/ (generated from '/') in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > > [25950] core @0.002043> [hit #7] --> got 1 in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 > > [25950] core @0.003189> [hit #7]entering before_template_render hook > > in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Hook.pm l. 58 > > [25950] core @0.006544> [hit #7]response: 200 in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 > > > > And 'before_template_render called' will be displayed. > > > > If you try http://0.0.0.0:3000/sitemap then you'll see: > > > > [25950] core @0.001133> [hit #8]Trying to match 'GET /sitemap' > > against /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > > [25950] core @0.001508> [hit #8]Trying to match 'GET /sitemap' > > against /^\/sitemap$/ (generated from '/sitemap') in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > > [25950] core @0.001807> [hit #8] --> got 1 in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 > > [25950] core @0.005524> [hit #8]response: 200 in > > /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 > > > > And a blank screen - you'll also note that the before_template_render > > hook isn't called in the trace.
Subject: Re: [rt.cpan.org #93548] before_template_render not being called if sitemap used as url
Date: Wed, 05 Mar 2014 18:52:28 +0000
To: bug-Dancer-Plugin-SiteMap [...] rt.cpan.org
From: Keith Jones <scopa90 [...] gmail.com>
Hello James thanks for your replies. Basically I'm using the before_template_render hook to populate url's in a menu and noticed that when I called /sitemap the url's were empty and managed to track it down to your code not calling the hook. Based on your reply I'll take a look at before_layout render and see if I can move the code to there so you can close the ticket. Regards, Keith On 05/03/2014 17:29, James Ronan via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=93548 > > > Having looked into this, before_template_render is a before hook which allows you to inject/mess with the tokens for the /template/. The /sitemap route has no template. It is merely some simple HTML wrapped in your /layout/. Therefore a call to /sitemap has no business invoking the before_template_render hook. It does however, and quite rightly, invoke the (before|after)_layout_render hooks. > > I've copied your example app and I get "before_template_render called" when I hit the '/' route, and I get the default sitemap when I hit '/sitemap'. > > Unfortunately I'm not sure what else I can do? From what you've said the sitemap isn't being generated or is crashing, but I can't replicate it. > > If you can give me any more information or have any more specific questions, I'll do my best to help you out. > > I'll leave this ticket open for a week or so to give you a chance to respond. > > Cheers, > JamesR > > > > > On Wed Mar 05 12:04:17 2014, JAMESR wrote:
>> Hi Keith, >> >> Thanks for the bug report. The site map plugin currently puts out a >> very simple HTML sitemap wrapped in your app's layout. >> So a renderer is never applied as I've never needed one. >> >> You're point is however valid and I shall work up a fix shortly. >> >> I'll let you know when I've pushed a new version to CPAN. >> >> Thanks again, >> JamesR >> >> >> On Wed Mar 05 11:25:42 2014, scopa90@gmail.com wrote:
>>> Hello >>> >>> first of all a small demo: >>> >>> ---- app.pl ---- >>> use Dancer; >>> use Dancer::Plugin::SiteMap; >>> use Template; >>> >>> hook before_template_render => sub >>> { >>> my $tokens = shift; >>> $tokens->{'demo'} = 'before_template_render called'; >>> }; >>> >>> get '/' => sub >>> { >>> template 'index.tt'; >>> }; >>> >>> dance; >>> ----end of app.pl---- >>> >>> ---- index.tt ---- >>> <% demo %> >>> ---- end of index.tt --- >>> >>> if you bring app,pl up then a call to http://0.0.0.0:3000 will show: >>> [25950] core @0.000316> request: GET / from 127.0.0.1 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 56 >>> [25950] core @0.001078> [hit #7]Trying to match 'GET /' against >>> /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001441> [hit #7]Trying to match 'GET /' against >>> /^\/sitemap$/ (generated from '/sitemap') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001760> [hit #7]Trying to match 'GET /' against >>> /^\/$/ (generated from '/') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.002043> [hit #7] --> got 1 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 >>> [25950] core @0.003189> [hit #7]entering before_template_render hook >>> in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Hook.pm l. 58 >>> [25950] core @0.006544> [hit #7]response: 200 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 >>> >>> And 'before_template_render called' will be displayed. >>> >>> If you try http://0.0.0.0:3000/sitemap then you'll see: >>> >>> [25950] core @0.001133> [hit #8]Trying to match 'GET /sitemap' >>> against /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001508> [hit #8]Trying to match 'GET /sitemap' >>> against /^\/sitemap$/ (generated from '/sitemap') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001807> [hit #8] --> got 1 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 >>> [25950] core @0.005524> [hit #8]response: 200 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 >>> >>> And a blank screen - you'll also note that the before_template_render >>> hook isn't called in the trace.
> >
Subject: Re: [rt.cpan.org #93548] before_template_render not being called if sitemap used as url
Date: Wed, 05 Mar 2014 19:01:18 +0000
To: bug-Dancer-Plugin-SiteMap [...] rt.cpan.org
From: Keith Jones <scopa90 [...] gmail.com>
Hello again just wanted to say that I moved the code to before_layout_render (a very simple change) and it works a treat. Thanks for your help Regards, Keith On 05/03/2014 17:29, James Ronan via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=93548 > > > Having looked into this, before_template_render is a before hook which allows you to inject/mess with the tokens for the /template/. The /sitemap route has no template. It is merely some simple HTML wrapped in your /layout/. Therefore a call to /sitemap has no business invoking the before_template_render hook. It does however, and quite rightly, invoke the (before|after)_layout_render hooks. > > I've copied your example app and I get "before_template_render called" when I hit the '/' route, and I get the default sitemap when I hit '/sitemap'. > > Unfortunately I'm not sure what else I can do? From what you've said the sitemap isn't being generated or is crashing, but I can't replicate it. > > If you can give me any more information or have any more specific questions, I'll do my best to help you out. > > I'll leave this ticket open for a week or so to give you a chance to respond. > > Cheers, > JamesR > > > > > On Wed Mar 05 12:04:17 2014, JAMESR wrote:
>> Hi Keith, >> >> Thanks for the bug report. The site map plugin currently puts out a >> very simple HTML sitemap wrapped in your app's layout. >> So a renderer is never applied as I've never needed one. >> >> You're point is however valid and I shall work up a fix shortly. >> >> I'll let you know when I've pushed a new version to CPAN. >> >> Thanks again, >> JamesR >> >> >> On Wed Mar 05 11:25:42 2014, scopa90@gmail.com wrote:
>>> Hello >>> >>> first of all a small demo: >>> >>> ---- app.pl ---- >>> use Dancer; >>> use Dancer::Plugin::SiteMap; >>> use Template; >>> >>> hook before_template_render => sub >>> { >>> my $tokens = shift; >>> $tokens->{'demo'} = 'before_template_render called'; >>> }; >>> >>> get '/' => sub >>> { >>> template 'index.tt'; >>> }; >>> >>> dance; >>> ----end of app.pl---- >>> >>> ---- index.tt ---- >>> <% demo %> >>> ---- end of index.tt --- >>> >>> if you bring app,pl up then a call to http://0.0.0.0:3000 will show: >>> [25950] core @0.000316> request: GET / from 127.0.0.1 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 56 >>> [25950] core @0.001078> [hit #7]Trying to match 'GET /' against >>> /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001441> [hit #7]Trying to match 'GET /' against >>> /^\/sitemap$/ (generated from '/sitemap') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001760> [hit #7]Trying to match 'GET /' against >>> /^\/$/ (generated from '/') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.002043> [hit #7] --> got 1 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 >>> [25950] core @0.003189> [hit #7]entering before_template_render hook >>> in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Hook.pm l. 58 >>> [25950] core @0.006544> [hit #7]response: 200 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 >>> >>> And 'before_template_render called' will be displayed. >>> >>> If you try http://0.0.0.0:3000/sitemap then you'll see: >>> >>> [25950] core @0.001133> [hit #8]Trying to match 'GET /sitemap' >>> against /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001508> [hit #8]Trying to match 'GET /sitemap' >>> against /^\/sitemap$/ (generated from '/sitemap') in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 >>> [25950] core @0.001807> [hit #8] --> got 1 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 >>> [25950] core @0.005524> [hit #8]response: 200 in >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 >>> >>> And a blank screen - you'll also note that the before_template_render >>> hook isn't called in the trace.
> >
Good show! Glad I could help :D Cheers, JamesR On Wed Mar 05 14:01:35 2014, scopa90@gmail.com wrote: Show quoted text
> Hello again > > just wanted to say that I moved the code to before_layout_render (a > very > simple change) and it works a treat. Thanks for your help > > Regards, > Keith > > On 05/03/2014 17:29, James Ronan via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=93548 > > > > > Having looked into this, before_template_render is a before hook > > which allows you to inject/mess with the tokens for the /template/. > > The /sitemap route has no template. It is merely some simple HTML > > wrapped in your /layout/. Therefore a call to /sitemap has no > > business invoking the before_template_render hook. It does however, > > and quite rightly, invoke the (before|after)_layout_render hooks. > > > > I've copied your example app and I get "before_template_render > > called" when I hit the '/' route, and I get the default sitemap when > > I hit '/sitemap'. > > > > Unfortunately I'm not sure what else I can do? From what you've said > > the sitemap isn't being generated or is crashing, but I can't > > replicate it. > > > > If you can give me any more information or have any more specific > > questions, I'll do my best to help you out. > > > > I'll leave this ticket open for a week or so to give you a chance to > > respond. > > > > Cheers, > > JamesR > > > > > > > > > > On Wed Mar 05 12:04:17 2014, JAMESR wrote:
> >> Hi Keith, > >> > >> Thanks for the bug report. The site map plugin currently puts out a > >> very simple HTML sitemap wrapped in your app's layout. > >> So a renderer is never applied as I've never needed one. > >> > >> You're point is however valid and I shall work up a fix shortly. > >> > >> I'll let you know when I've pushed a new version to CPAN. > >> > >> Thanks again, > >> JamesR > >> > >> > >> On Wed Mar 05 11:25:42 2014, scopa90@gmail.com wrote:
> >>> Hello > >>> > >>> first of all a small demo: > >>> > >>> ---- app.pl ---- > >>> use Dancer; > >>> use Dancer::Plugin::SiteMap; > >>> use Template; > >>> > >>> hook before_template_render => sub > >>> { > >>> my $tokens = shift; > >>> $tokens->{'demo'} = 'before_template_render called'; > >>> }; > >>> > >>> get '/' => sub > >>> { > >>> template 'index.tt'; > >>> }; > >>> > >>> dance; > >>> ----end of app.pl---- > >>> > >>> ---- index.tt ---- > >>> <% demo %> > >>> ---- end of index.tt --- > >>> > >>> if you bring app,pl up then a call to http://0.0.0.0:3000 will > >>> show: > >>> [25950] core @0.000316> request: GET / from 127.0.0.1 in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 56 > >>> [25950] core @0.001078> [hit #7]Trying to match 'GET /' against > >>> /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > >>> [25950] core @0.001441> [hit #7]Trying to match 'GET /' against > >>> /^\/sitemap$/ (generated from '/sitemap') in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > >>> [25950] core @0.001760> [hit #7]Trying to match 'GET /' against > >>> /^\/$/ (generated from '/') in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > >>> [25950] core @0.002043> [hit #7] --> got 1 in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 > >>> [25950] core @0.003189> [hit #7]entering before_template_render > >>> hook > >>> in /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Hook.pm l. 58 > >>> [25950] core @0.006544> [hit #7]response: 200 in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 > >>> > >>> And 'before_template_render called' will be displayed. > >>> > >>> If you try http://0.0.0.0:3000/sitemap then you'll see: > >>> > >>> [25950] core @0.001133> [hit #8]Trying to match 'GET /sitemap' > >>> against /^\/sitemap\.xml$/ (generated from '/sitemap.xml') in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > >>> [25950] core @0.001508> [hit #8]Trying to match 'GET /sitemap' > >>> against /^\/sitemap$/ (generated from '/sitemap') in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 84 > >>> [25950] core @0.001807> [hit #8] --> got 1 in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Route.pm l. 102 > >>> [25950] core @0.005524> [hit #8]response: 200 in > >>> /usr/local/lib/perl5/site_perl/5.18.2/Dancer/Handler.pm l. 179 > >>> > >>> And a blank screen - you'll also note that the > >>> before_template_render > >>> hook isn't called in the trace.
> > > >