Hi all!
I have written a module similar to CGI::Persistent, but then intended for MySQL.
The idea is simple. Once a scripts initiates a new object, the constructor reads the propper data from the database and thaws it (I use Storable qw(thaw nfreeze) for this)
I check wheter an ID was given when calling the ->new routine. If not I read the &CGI::param("id") (or ID) for an ID.
The ID is looked up in the DB, the data thawn and given back in the object to the script.
I also have a ->store() routine, which I don't want to force upon my module users so I have it called upon from the ->DESTROY() routine.
This works fine when testing stuff on the shell, but under apache, this doesn't work...
I use base qw(CGI) - so I was wondering wheter my DESTROY isn't called because the CGI::DESTROY is called or if it isn't called because of the way the scripts die under apache's wings...
Thanks in advance 4 all ur answers!
Sinister greetings.
"With tying hashes you can do everything God and Larry have forbidden" -- Johan Vromans - YAPC::Europe 2001
perldoc -q $_