9 $ENV{OBJECT_REMOTE_TEST_LOGGER} = 1;
14 my @test_data = qw(1 5 10 30 80);
17 map { $test_sum += $_ } @test_data;
19 my $conn = Object::Remote->connect('-');
20 my $remote = ORTestTiedRemote->new::on($conn);
22 isa_ok($remote, 'Object::Remote::Proxy');
24 my $remote_array = $remote->array;
25 my $remote_hash = $remote->hash;
27 is(ref($remote_array), 'ARRAY', 'Array ref is array ref');
28 is(ref(tied(@$remote_array)), 'Object::Remote::Proxy', 'Array is tied to proxy object');
29 is_deeply($remote_array, ['another value'], 'Array is initialized properly');
31 @$remote_array = @test_data;
32 is($remote->sum_array, $test_sum, 'Sum of array data matches sum of test data');
34 is(ref($remote_hash), 'HASH', 'Hash ref is hash ref');
35 is(ref(tied(%$remote_hash)), 'Object::Remote::Proxy', 'Hash is tied to proxy object');
36 is_deeply($remote_hash, { akey => 'a value' }, 'Hash is initialized properly');
39 do { my $i = 0; map { $remote_hash->{++$i} = $_ } @test_data };
40 is($remote->sum_hash, $test_sum, 'Sum of hash values matches sum of test data');