[Dancer-users] messed up routes

Richard Huxton dev at archonet.com
Thu Oct 20 21:50:42 CEST 2011

On 20/10/11 20:05, Puneet Kishor wrote:
> On Oct 20, 2011, at 1:40 PM, Richard Huxton wrote:
>>> In fact, think this through -- if the above is really true, then once
>>> the non-default layout has been set (say, 'main_presentation') then
>>> the default 'main' layout should never be set for anyone because I
>>> wasn't explicitly setting the main layout. But, that wasn't the case
>>> as well.
>> Well, it'll be set if that backend hasn't changed it yet, because that's what it defaults to (I assume). But, if you've only got one backend then you're correct.
> Just one backend. All my apps are with Starman serving on<port>  proxied behind Apache VirtualHost front ends.

Sorry - we're using different terminology. Starman has a --workers 
option which you usually set to something greater than 1. Each one will 
have its own settings (including the "layout" setting). Each request can 
go to a different worker. So you can end up with:
request 1: login page - worker 1 - sets layout = nomenu
request 2: home page  - worker 2 - sets layout = menu
request 3: news page  - worker 1 - will start with layout=nomenu

Now, if request 3 had gone to worker 2 you would have had a default 
layout of "menu" instead. I think this is what you are seeing, you can 
see how if you've got 10 workers the situation can get confusing.

   Richard Huxton
   Archonet Ltd

More information about the Dancer-users mailing list