[dancer-users] Dancer2 0.150000 - Codename LoonyPandora

Stefan Hornburg (Racke) racke at linuxia.de
Mon Aug 18 12:53:33 BST 2014

On 08/18/2014 01:45 PM, Andrew Beverley wrote:
> On Mon, 2014-08-18 at 13:10 +0200, Stefan Hornburg (Racke) wrote:
>>> Is there another way to retrieve params from directly within a module?
>> $dsl->app->request->params ?
> Great, thanks, that works.
> Now, what about writing a session value from within a plugin?
>     $dsl->app->session('user_id', 5);
> gives "session is a read-only accessor"

->session->write(user_id => 5);

>>> For info, I'm writing (yet another) authentication plugin. I'll send
>>> details to this list once it's ready(ish).
>> Uh why (yet another) ??
> Just because I want one that "does everything" (including password
> resets, storing user details etc), and can interface with DBIC. I find
> that I keep writing the same code over and over in different
> applications. I'm happy to keep it private, but I may as well release it
> in case anyone else has a use for it.

Why don't you extend Dancer2::Plugin::Auth::Extensible [1] with this very reasonable
features? Less code to write and more people happy about your work.

[1] https://github.com/racke/Dancer2-Plugin-Auth-Extensible (migration in progress)


Perl and Dancer Development

Visit our Perl::Dancer conference 2014:


More information about the dancer-users mailing list