2009/11/7 Bill Moseley <[email protected]>: > Is it the intended behavior to set a cookie any time the session is > *fetched* even if nothing is set in the session?
I wouldn't say that it is intended behaviour, but it is behaviour that is used in the C::P::Session test suite. When you check for a session using $c->session a session is created and then persisted on the browser using a cookie. There is no logic to check if there is anything interesting stored in the session (ie that it is not a 'null session'). You might want to look at the following code which I wrote a while back and added to the repo but never released to CPAN - it would just muddy the waters: http://dev.catalystframework.org/repos/Catalyst/Catalyst-Plugin-Session/0.00/branches/high_performance/ It tries not to do anything silly :) Cheers, Edmund. > -- > Bill Moseley > [email protected] > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ > > _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
