This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
From: Dave Rolsky <autarch@urth.org> To: Kurt Bales <kwbales@phreaqshow.com> Subject: Re: [Mason] Session Variables without Parser Date: Sun, 1 Dec 2002 13:49:32 -0600 (CST) On Sun, 1 Dec 2002, Kurt Bales wrote: > Is there a newer version of session_handler.pl available, or will I need > to hack one up for myself? It's probably easier just to use MasonX::Request::WithApacheSession on CPAN. -dave /*================== www.urth.org we await the New Sun ==================*/ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users === Subject: [Mason] Session Variables without Parser From: "Kurt Bales" <kwbales@phreaqshow.com> To: <mason-users@lists.sourceforge.net> Date: Wed, 4 Dec 2002 23:15:11 +1100 ------------- Hey Dave, this is gonna sound like a really dumb question, but how do I retreive a session variable using MasonX::Request::WithApacheSession. I have assigned the values using "$m->session->{first_name} = 'Kurt'", and a row is added to my postgres table, if I issue "<% $m->session->{first_name} %>" that just generates another row in the db, as opposed to returning the value. I am sure it is supposed to do that, but I cannot work out who to retreive them... Clueless, Kurt PS. I have had your book on order since the day you announced it release... hopefully it will filter its way to Sydney, Australia soon enough! I look forward to reading it. ------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users === From: Dave Rolsky <autarch@urth.org> To: Kurt Bales <kwbales@phreaqshow.com> Subject: Re: [Mason] Session Variables without Parser Date: Wed, 4 Dec 2002 19:15:05 -0600 (CST) On Wed, 4 Dec 2002, Kurt Bales wrote: > this is gonna sound like a really dumb question, but how do I retreive a > session variable using MasonX::Request::WithApacheSession. > > I have assigned the values using "$m->session->{first_name} = 'Kurt'", > and a row is added to my postgres table, if I issue "<% > $m->session->{first_name} %>" that just generates another row in the db, > as opposed to returning the value. I am sure it is supposed to do that, > but I cannot work out who to retreive them... What you have above should work, assuming you've told the ::WithApacheSession module to manage cookies for you. If you haven't then its expecting you to provide the session id yourself, which you probably don't want to do. Without a session id (either from cookies or you), it'll end up making a new session every time you call "$m->session", which would explain why its inserting a row in the DB every time you call that method. -dave /*================== www.urth.org we await the New Sun ==================*/ ------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users