[Dancer-users] trouble with sessions

Mr. Puneet Kishor punk.kish at gmail.com
Fri Mar 25 13:36:42 CET 2011


On Mar 25, 2011, at 8:32 AM, David Precious wrote:

> On Friday 25 March 2011 12:22:35 Mr. Puneet Kishor wrote:
>> I added the above to create(), not to init(), so create() now looks like so
>> 
> [...] 
>> 
>> Yes, now the session id is generated, and things work as before. But, is
>> this the correct fix? I am looking at your DSStorable for the pattern, and
>> you have no such session SUPER::init() method in there.
> 
> I'm pretty sure you want it to be in your init() method.  init() is called 
> when the session engine is initialised.
> 
> As for D::S::Storable, its init() method starts with:
> 
>    sub init {
>        my ($class) = @_;
> 
>        $class->SUPER::init(@_);
> 
> 


Interesting. The above must have changed in DSStorable version 0.02. I still have version 0.01, which is what I used as a pattern for DSSQLite. So, now I have added the above to my module, and yes, it works now.

Again, the strange mystery is that this has worked for 7 months until a couple of days ago (actually, I first noticed this last night, so it was working fine until the day before).

Oh well.

Ok, I will test out DSSQLite once again, add more docs to it, and then release it on CPAN.

Many thanks,


> Cheers
> 
> Dave P
> 
> 
> -- 
> David Precious <davidp at preshweb.co.uk> (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)



More information about the Dancer-users mailing list