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 18:01:40-07 by jerome in response to 11449
Re: Retrieving or thawing arbitrary OIO-based classes

Thanks for your prompt response. I actually tried something similar while troubleshooting but without the last call to 'new'. Your example assumes though that the receiving process knows how to instantiate $class. That won't be the case for me. Am I right to think that the sole purpose of your call to 'new' is to run 'initialize'? Before posting to this forum I realized that calling (a hacked-up version of) 'initialize' before thawing seems to do the trick as well. Would it make sense to allow users to do something like this instead?:

sub load_class { my $class = $_[0]; eval "require $class"; if ($@) { die("Failed to load $class: ".$@); } $class->initialize; }
Direct Responses: 11452 | Write a response