Yes it is as below, but of course we have found occasionally someone has missed exception handling - that is what causes the issue. Yes we should be trapping exceptions, but regardless this seems like something that should still work? Z
-----Original Message----- From: dancer-users [mailto:dancer-users-bounces@dancer.pm] On Behalf Of Dan Busarow Sent: 05 April 2016 14:16 To: dancer-users@dancer.pm Subject: Re: [dancer-users] ajax route error
How are you handling your layouts?
I specify my layout in my call to template it the end of a route, e.g.
any '/:dir/:page' => sub { my $dir = param('dir'); my $page = param('page'); template $page, { path => request->path }, { layout => $dir }; };
That's a very simple and Dancer vs Dancer2 but even in a complicated route, the layout should not be affected until Dancer is rendering the page, hopefully you caught an exception well before then.
Dan -- Dan Busarow dan@buildingonline.com 949 496 6648 x218 Follow BuildingOnline on: http://Twitter.com/BuildingOnline http://Facebook.com/BuildingOnline http://Linkedin.com/groupRegistration?gid=1925831
On 4/5/16 3:09 AM, Zahir Lalani wrote:
Hi All
We are experiencing loss of CSS style under certain circumstances and have to completely restart starman to cure. We traced this to the ajax processing and found this issues logged:
https://github.com/PerlDancer/Dancer2-Plugin-Ajax/issues/1
Has anyone seen this issue before?
*Zahir Lalani Head of Development & Architecture*
cid:96F784CA-E917-4CC1-A9A9-96CBDA2AF2BC
2 Tabernacle Street,
London, EC2A 4LU
m: +44 (0)7956 455168
t: +44 (0)203 142 3619
e: _zahirlalani@oliver-marketing.com <mailto:zahirlalani@oliver-marketing.com>_
w: www.oliver-marketing.com <http://www.oliver-marketing.com/>
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users