lindex has asked for the wisdom of the Perl Monks concerning the following question:
I think that this idea should work, but Iam getting an error from storable saying "Magic number checking on storable string failed etc etc ..". would anyone care to shed a little light on my situation?use Storable qw(nfreeze thaw); sub make_cookie { return($q->cookie( -name=>'sessionID', -value=>unpack("H*",nfreeze(['1245','foo','foopass'])), -expire=>'+10m', -secure=>0 )); } sub see_cookie { return(@{thaw(pack("H*",$_[0]))}); }
/****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Serializing Cookies ???
by steveAZ98 (Monk) on Dec 06, 2000 at 03:04 UTC | |
by lindex (Friar) on Dec 06, 2000 at 03:11 UTC | |
|
Re: Serializing Cookies ???
by lhoward (Vicar) on Dec 06, 2000 at 03:23 UTC | |
|
(Ovid) Re: Serializing Cookies ???
by Ovid (Cardinal) on Dec 06, 2000 at 02:47 UTC | |
by lindex (Friar) on Dec 06, 2000 at 02:51 UTC |