This is due to a bug in the session package - there's an RT ticket about it here: https://rt.cpan.org/Public/Bug/Display.html?id=69075 basically the init method is overloaded without calling super::init. you can either do as the patch in the RT ticket says, or rename the init method import - then the memcache config is run at startup (see attached patch) alex ________________________________________ From: dancer-users-bounces@perldancer.org [dancer-users-bounces@perldancer.org] On Behalf Of Flavio Poletti [polettix@gmail.com] Sent: 26 September 2011 21:58 To: dancer-users@perldancer.org Subject: Re: [Dancer-users] Memcached beginners problem The "crash" depends on the fact that all warnings are promoted to fatal errors in the development environment. It seems that you're getting a warning about a key that is not defined. It would help to see the code that you use to retrieve the stuff in the session, i.e. the calls to session(). Cheers, Flavio. On Mon, Sep 26, 2011 at 4:59 PM, Niels Larsen <niels@genomics.dk<mailto:niels@genomics.dk>> wrote: Greetings, I, a Dancer newcomer, have trouble getting Dancer::Session::Memcached to work. All works with session Simple, but with memcached I get the error below. The memcached server was started with ./memcached (responds on port 11211) and the Cache::Memcached module is installed. The application was started with just ./application.pl<http://application.pl> --environment development, and the development.yml file has in it session: "memcached" memcached_servers: "127.0.0.1:11211<http://127.0.0.1:11211>" I did not 'use Dancer::Session::Memcached' because documentation does not say so, and I'm sure its a dumb mistake by me. But the crash is not so informative, and the format of the listing could be also be improved: module names (not file names) and line numbers should be at the left so they line up, and the traceback should include application code. It only shows Dancer code. And a wish: the Messagepack library is the fastest serialization method, I think, and I hope Dancer will support it some day. I use it already, and Kyoto Tycoon for permanent storage, works well. Unlike Membase/cache one can save pretty big strings, which reduces the number of times one must touch the storage, which again speeds the whole thing. Niels Larsen http://genomics.dk ------------------------------------------------------------------------ Error 500 runtime error Warning caught during route execution: Use of uninitialized value $key in concatenation (.) or string at /home/donate/DONATE/Software/Package_installs/Perl_modules/lib/perl5/Cache/Memcached.pm line 521. 518 $exptime = int($exptime || 0); 519 520 local $SIG{'PIPE'} = "IGNORE" unless $FLAG_NOSIGNAL; 521 my $line = "$cmdname $self->{namespace}$key $flags $exptime $len \r\n$val\r\n"; 522 523 my $res = _write_and_read($self, $sock, $line); 524 ------------------------------------------------------------------------ _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org<mailto:Dancer-users@perldancer.org> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users