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