Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Implement Object Persistence (II)by tucano (Scribe) |
on Apr 29, 2005 at 14:22 UTC ( [id://452618]=CUFP: print w/replies, xml ) | Need Help?? |
After my first Node (DON'T) use Data::Dumper to implement Object persistence (the next above) I understand that my first Idea is not so cool ... :-) That there are a lot of way to make a lightweight object persistence, and Data::Dumper is the more stupid In this version I use DBM::Deep to make the work, seems that with Data::Dumper and the eval function I have a big security hole in code (a bad boy can substitute one object file with somethins like system ("rm -rf /") and destroy my server). So I try to implement an Object Persistence with a db file and the class DBM::Deep. Dump the Object
Where $probeset is a reference to an Object. Import the Object In another CGI script... And now bless the Object with the specific Class!
Hope that could be useful. Regards. ----------------><-------------------- There is nothing which cannot be answered by means of my doctrine," said a monk, coming into a teahouse where Nasrudin sat. "And yet just a short time ago, I was challenged by a scholar with an unanswerable question," said Nasrudin. "I could have answered it if I had been there." "Very well. He asked, 'Why are you breaking into my house in the middle of the night?'"
Back to
Cool Uses for Perl
|
|