Kyle R . Burton on Thu, 10 Apr 2003 11:26:12 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] perl objects and file storage


> Is it possible to store complex data structures
> composed of references/objects, or even hash's/arrays
> to file and retrieve them?  I know it can be done
> through a somewhat complex algorithm, and then some
> encoding/decoding, but does anyone know of a simpler
> way, perhaps a module?  I would like to simulate php
> sessions.

Have a look at Data::Dumper and the Storable modules.  I beleive Data::Dumper
is a core module, while Storable is common in many distributions.

There are other session mecahnisims available, depending on what environment
you're running in.  See the Apache::Session modules if you're running under 
mod_perl.  Many of the HTML/Application server enviornment support sessions
(like Mason and Pas), so if you're using one of those packages you probably
have them available already.


hth,
Kyle R. Burton

-- 

------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
        -- Christmas Humphreys
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------
_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug