3 use Sys::Hostname qw(hostname);
5 $ENV{OBJECT_REMOTE_TEST_LOGGER} = 1;
7 use Object::Remote::FromData;
9 my $connection = Object::Remote->connect('-');
11 my $remote = My::Data::TestClass->new::on($connection);
13 is($remote->counter, 0, 'Counter at 0');
15 is($remote->increment, 1, 'Increment to 1');
17 is($remote->counter, 1, 'Counter at 1');
20 My::Data::TestPackage->can::on($connection, 'hostname')->(),
28 package My::Data::TestClass;
32 has counter => (is => 'rwp', default => sub { 0 });
34 sub increment { $_[0]->_set_counter($_[0]->counter + 1); }
36 package My::Data::TestPackage;