[Dancer-users] Custom Session Handler issues
J. Bobby Lopez
jbl at jbldata.com
Fri May 27 18:24:00 CEST 2011
Thanks for that, makes things a little clearer.
The reason why I wanted to use CGI; was to get access to CGI->cookie. But
from what you're saying (if I understand correctly), I should be abel to
'use Dancer qw(:syntax)', and I'll have access to the same 'cookies' method
that the Dancer core app does.
On Fri, May 27, 2011 at 12:15 PM, David Precious <davidp at preshweb.co.uk>wrote:
> [resending to list, as I realised I sent it direct approximately one
> ohnosecond after clicking send]
> On Friday 27 May 2011 17:04:35 J. Bobby Lopez wrote:
> > 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
> > For example, can I access CGI->self_url() somehow?
> The plugin loads CGI::Session, so anything that CGI::Session exports by
> default would be exported into the *plugin*'s namespace. (The plugin could
> skip using Dancer::ModuleLoader and just "use CGI::Session ();" directly,
> avoid anything being exported).
> The plugin could provide a keyword like, say, cgi_session() that would give
> you direct access to the CGI::Session object, should you need to do things
> with it directly.
> I'm not sure why you'd want to use CGI.pm within a Dancer app, personally,
> would I be sure it would work appropriately either, especially if it
> to use STDIN and STDOUT.
> > 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?
> Any module that imports Dancer syntax with "use Dancer qw(:syntax)" would
> able to use them.
> Dave P
> David Precious ("bigpresh")
> "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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dancer-users