http://www.perlmonks.org?node_id=177279


in reply to Maintaining state through storable.pm?

1. Kind of. Since you plan on only storing user objects, you ought to make sure that the objects are stored separate from any other objects (even if you don't got any now, a /users/ or /sessions/ directory ought to be appropriate). I'd personally go with File::Cache for easy session maintenance (expired objects get expunged automagically, merlyn had an article here, I got a CGI::App sample here).

2. Hmm, see the Storable documentation, all of it (there is freeze/thaw to do it from memory, meaning a scalar, which is what you're looking for, or should've been)

3. Hmm, can you say PPM my boy, can you (1.012 seems recent enough for me as well as 1.0.10, but in case you need 2.4 or whatever, i'll didtry'n'compile and put it on my ppm repository)?

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

  • Comment on Re: Maintaining state through storable.pm?