samizdat has asked for the wisdom of the Perl Monks concerning the following question:
[* use Apache; use Apache::Session::Memcached; my %session; tie %session, 'Apache::Session::Memcached', undef, { 'Servers' => ['127.0.0.1:20000'], 'NoRehash' => 1, 'Readonly' => 0, 'Debug' => 1, 'CompressThreshold' => 10_000, }; *] <HTML> <HEAD> ...
I've looked through the docs on Apache::Session, Cache::Memcached, and memcached itself, but it doesn't function. I did try changing the syntax of the hash from the original example in Apache::Session::Memcached to the above, which has quotes around the keys and has the Servers line be an anon array ref, but neither functions properly in the embperl context. The above, however, does function in raw perl; ther only thing I changed was adding[728]ERR: 24: Error in Perl code: Can't locate object method "TIEHASH" + via package "Apache::Session::Memcached" at /var/web/root/index.epl +line 10. [728]ERR: 24: index.epl(1): Error in Perl code: Apache/1.3.33 (Unix) mod_perl/1.29 PHP/5.0.0a6-alexdupre HTML::Embperl + 1.3.6 [Thu Mar 3 06:49:48 2005]
and stripping out the HTML. I get a message on console giving me back a session ID. I've also tried using the bracket-minus form as opposed to bracket-asterisk; no diff.#!/usr/bin/perl use warnings;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: embperl and Apache::Session::Memcached
by perrin (Chancellor) on Mar 03, 2005 at 14:43 UTC | |
by samizdat (Vicar) on Mar 03, 2005 at 15:09 UTC | |
by samizdat (Vicar) on Mar 03, 2005 at 15:00 UTC |