[Dancer-users] Custom Session Handler issues

J. Bobby Lopez jbl at jbldata.com
Fri May 27 18:04:35 CEST 2011


I took a look at the code you have for the CGISession implementation, it
looks fairly straight forward.

A couple of questions though:


   1. Does using Dancer::ModuleLoader->load('CGI::Session') mean that we
   should have access to all objects and methods exported by CGI::Session? For
   example, can I access CGI->self_url() somehow?
   2. Would I be able to access Dancer settings and variables form a
   sub-module?  E.g.:  Is there any way to access Dancer's 'cookies' or
   'session' info from a module, without having to pass them as arguments to my
   module?

-Bobby

On Wed, May 18, 2011 at 1:25 PM, David Precious <davidp at preshweb.co.uk>wrote:

> On Wednesday 18 May 2011 16:56:39 David Precious wrote:
> > In that case, the proper answer is most likely to write a
> > Dancer::Session::CGISession session engine which provides compatibility
> > with CGI::Session-based sessions, then set that as your chosen session
> > engine and use Dancer's own session support.
> >
> > Writing a session engine wrapper is quite simple - you simply inherit
> from
> > Dancer::Session::Abstract and implement the required methods.  You could
> > take a look at Dancer::Session::Simple for a dead-simple example.
>
> In fact, take a look at
> https://github.com/bigpresh/Dancer-Session-CGISession
> which I've just started.
>
> Not yet ready to use, and I'm off out to play darts tonight so won't have
> it
> working tonight, but should be able to finish it soon, it's pretty simple
> stuff.
>
> Feel free to fork and submit pull requests if you want to help it along :)
>
> Cheers
>
> Dave P
>
>
> --
> David Precious  ("bigpresh")
> http://www.preshweb.co.uk/
>
>   "Programming is like sex. One mistake and you have to support
>   it for the rest of your life". (Michael Sinz)
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110527/08793217/attachment.htm>


More information about the Dancer-users mailing list