jasona at inetarena.com
Fri Jul 19 20:29:26 CDT 2002
I'm using Data::Dumper to save and restore objects.
Here is my RestoreFromFile function.
return $VAR1; # returns a reference to an object
# Why does Data::Dumper format the dump so nicely?
# I'm going to have to strip out all the newlines before writing to make this more useful
my $tmp = RestoreFromFile("objectfile");
I now have a pointer to my object($tmp) but how do I typedef it or anothr variable to the right object type?
$tmp->ObjectMethod() doesn't work, it thinks I'm trying to invoke a method of a scalar (the reference) not the object type.
P.S. There has to be a better serialization strategy, doesn't there?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pdx-pm-list