Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: handling Perl Persistent Objects

by Brovnik (Hermit)
on Jul 03, 2001 at 15:16 UTC ( #93457=note: print w/ replies, xml ) Need Help??


in reply to handling Perl Persistent Objects

Firstly, Data::Dumper doesn't give you persistence directly.
It is the storing and retrieval of data serialised by Data::Dumper that gives you persistence.

How you loop through depends on whether you use coarse or fine grained persistence.

Coarse grained will retrieve all the data at the start of the progrma and dump it all at the end. Has the advantage of simplicity, and the data can be manipulated using normal Perl during the program.

Fine grained will store and retrieve each individual object each time it is accessed. Advantages are smaller memory footprint for data, and less likely to lose data if the program crashes. Needs more complicated mechanism for handling the storage.

Suggested Refernces :

  • The Object Oriented Perl book has an excellent tutorial on persistence, and suggests classes that could abstract the work away into a class.
  • Module DbFramework::Persistent
  • Module Tangram
Tangram is fairly heavy duty, and may be overkill, and both assume a database.
--
Brovnik


Comment on Re: handling Perl Persistent Objects

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://93457]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2014-07-24 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls