[Catalyst] Why Store::FastMmap and State::Cookie in Advent example?

Yuval Kogman nothingmuch at woobling.org
Tue Jan 10 22:45:56 CET 2006


On Tue, Jan 10, 2006 at 16:28:56 -0500, Kevin Old wrote:
> Hello everyone,
> 
> I'm incorporating sessions into my Catalyst app and was looking over
> the example at
> http://catalyst.perl.org/calendar/2005/15
> 
> I was wondering why the use of Session::Store::FastMmap and
> Session::State::Cookie?  I was under the impression that sessions and
> cookies were traditionally used separately.
> 
> Also, I recall previous code in the catalyst svn server to use just
> Session::Store::FastMmap.

No, in the past Session::FastMmap was the whole system - session
management, session data storage in a Cache::FastMmap backend, and
session state management with either cookies or URI rewriting
(provided by State::Cookie and State::URI in the new system).

> I've applied the code and it is working great, but was just wondering
> why it was used that way.

Generality - duplicating the session handling code for every store
backend (cookies, expiry, debug messages, policy, ticks like
->flash) is just not very DRY ;-)

-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!




More information about the Catalyst mailing list