Skip Menu |

This queue is for tickets about the Dancer-Session-Memcached CPAN distribution.

Report information
The Basics
Id: 69075
Status: resolved
Priority: 0/
Queue: Dancer-Session-Memcached

People
Owner: Nobody in particular
Requestors: dam [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.1
Fixed in: (no value)



Subject: D:S:Memcached::init() does not call SUPER::init()
Hi, It seems Dancer::Session::Memcached overrides the init() method without calling SUPER::init(). This breaks the generation of session ID, resulting in failure to store the session in memcached. Additionally, Cache::Memcached complains about usage of undefined $key in string, which results in a Dancer crash when the warnings are trapped. The patch attached fixes the problem by propagating the call to SUPER::init(). Thanks, dam
Subject: init-call-super.patch
Description: make init() call SUPER::init() for proper initialization of id Without id, the session can't be stored by memcached. Besides, using undef id makes Cache::Memcached give a warning, which can result in Dancer crash if warnings are trapped. Origin: vendor Author: Damyan Ivanov <dmn@debian.org> Last-Update: 2011-06-24 --- a/lib/Dancer/Session/Memcached.pm +++ b/lib/Dancer/Session/Memcached.pm @@ -17,7 +17,7 @@ $VERSION = '0.1'; my $MEMCACHED; sub init { - my ($class) = @_; + my $self = shift; my $servers = setting("memcached_servers"); die "The setting memcached_servers must be defined" @@ -32,6 +32,8 @@ sub init { } $MEMCACHED = Cache::Memcached->new(servers => $servers); + + $self->SUPER::init(@_); } # create a new session and return the newborn object
Fixed and released new version. Thanks! :)