[dancer-users] session() auto-flush

Henk van Oers hvo.pm at xs4all.nl
Fri Feb 14 09:42:07 GMT 2014

On Fri, 14 Feb 2014, Naveed Massjouni wrote:
> On Thu, Feb 13, 2014 at 11:37 PM, Warren Young <warren at etr-usa.com> wrote:
>>     $session->{foo} = 'bar';

>>     session 'more' => 'changes here';
> It does not make sense to me that calling session() as a getter (as
> opposed to a setter) should write out the session on each access. To
> do that would probably require using Tie::Hash to have it invoke
> flush() on every modification of the hash. I'm not sure if that extra
> complexity is worth the benefit.

That's not the problem.

As I read it:

my $foo = session 'foo'; # getter after setter session 'more' => 'changes here';

is gone.


More information about the dancer-users mailing list