william wrote:

> Then I would need to modify the QueryData module then, 

No don't do that.

> by modifying
> the standard module would it make my future maintenance more
> complicated ? 

Absolutely.

> Do you have any tips for me ?

Wrap the object in your own package. Let's call it My::QueryData.

package My::QueryData;
use QueryData;

my $query_data;
sub create {
  $query_data = QueryData->new(...);
}

sub get {
  return $query_data;
}

> Btw, I love to know the potential solution for object that would be
> modified by the child process ? The child that obtain the object must
> have the property of the object that last modified. Because I guess I
> am going to face the problem quite soon.
> Thanks.

It's the same basic idea for sharing something between any processes (it's not
specific to mod_perl). And that's to put the serialized object into some sort of
3rd party data store. Whether this is a database (which scales to multiple
machines) or a DBM file (which is quick and easy but doesn't handle multiple
machines) depends on your needs.

-- 
Michael Peters
Plus Three, LP

Reply via email to