I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-09-15 16:49:06-07 by jdhedden in response to 11448
Re: Retrieving or thawing arbitrary OIO-based classes
The 'data' for an OIO object is not stored in the object itself, but in lists/hashes within the object's class. Therefore the class must first exist in order for there to be a place to store the object data.

My suggestion is to do this in two steps:
1. First send over the class, and have the receiving end load that class using the following:
sub load_class { my $class = $_[0]; eval "require $class"; if ($@) { die("Failed to load $class: ".$@); } eval "$class->new()"; }
2. Then send over the object as you're doing now.

The last line in the subroutine is needed to ensure that $class is loaded and initialized properly. Hope this helps.
Direct Responses: 11451 | Write a response