[Dancer-users] messed up routes

Mr. Puneet Kishor punk.kish at gmail.com
Thu Oct 20 18:13:18 CEST 2011


On Oct 20, 2011, at 10:47 AM, Naveed Massjouni wrote:

> On Thu, Oct 20, 2011 at 9:36 AM, Mr. Puneet Kishor <punk.kish at gmail.com> wrote:
>> 
>> On Oct 19, 2011, at 11:46 PM, Matthew Vickers wrote:
>> 
>>> On 20/10/11 2:51 PM, Mr. Puneet Kishor wrote:
>>>> Suggestions? I am serving about 10 or 12 different apps using Starman proxied behind Apache2, if that is any help.
>>>> 
>>> Hi Puneet,
>>> 
>>> Have you tried setting the layout in the template call ?
>>> 
>>> ...
>>> 
>>> template 'video_mov', \%template_opts, { layout =>  'main_video' };
>>> 
>>> ...
>>> 
>>> template 'presentation_slides', \%template_opts, { layout =>  layout 'main_presentation' };
>>> 
>>> 
>> 
>> 
>> hmmmm... so you are implying that perhaps having a separate `layout 'main_presentation'` is not enough? Or, are you implying that even though I have `layout 'main_presentation'` in the presentation route, and `layout 'main_video'` in the video route, perhaps I am seeing these problems because I don't have `layout 'main'` in my regular route?
>> 
> 
> I think he was saying that you might have code in your apps such as:
>    set layout => 'foo';
> This would set the layout globally and might have been the cause of your issue.

In that case, no, I never used `set layout => 'foo'` anywhere in my code. Only within specific routes, I used `layout 'foo'`. So, one, IFF `layout 'foo'` has the same effect as `set layout => 'foo'`, even then it shouldn't have mattered, because every route is doing its own `layout 'foo'`. In other words, even if me or some other user requests a route that does `layout 'foo'`, when me or the other user requests a route with a different layout, that route has its own `layout 'bar'`. I don't see how even cross browser or cross computer invocations could affect.

Well, I will keep an eye on the app and see if the problem recurs after having implemented Matthew Vickers' suggestion.

--
Puneet Kishor



More information about the Dancer-users mailing list