sub register_class_call_handler {
my ($self) = @_;
$self->local_objects_by_id->{'class_call_handler'} ||= do {
- my $o = Object::Remote::CodeContainer->new(
- code => sub {
- my ($class, $method) = (shift, shift);
- use_module($class)->$method(@_);
- }
- );
+ my $o = $self->new_class_call_handler;
$self->_local_object_to_id($o);
$o;
};
}
+sub new_class_call_handler {
+ Object::Remote::CodeContainer->new(
+ code => sub {
+ my ($class, $method) = (shift, shift);
+ use_module($class)->$method(@_);
+ }
+ );
+}
+
sub register_remote {
my ($self, $remote) = @_;
weaken($self->remote_objects_by_id->{$remote->id} = $remote);