6 $ENV{OBJECT_REMOTE_TEST_LOGGER} = 1;
9 ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib)
18 my $proxy = ORTestTransfer->new::on('-', value => \$strA);
19 is_deeply $proxy->value, \$strA, 'correct value after construction';
20 }, undef, 'scalar refs - no errors during construction';
23 my $proxy = ORTestTransfer->new::on('-');
24 $proxy->value(\$strB);
25 is_deeply $proxy->value, \$strB, 'correct value after construction';
26 }, undef, 'scalar refs - no errors during attribute set';
28 my $data_file = "$FindBin::Bin/data/numbers.txt";
32 open my $fh, '>', \$out or die "Unable to open in-memory file: $!\n";
33 my $proxy = ORTestGlobs->new::on('-', handle => $fh);
34 ok $proxy->handle, 'filehandle was set';
35 ok $proxy->write('foo'), 'write was successful';
36 is $out, 'foo', 'write reached target';
37 }, undef, 'filehandles - no error during construction';
40 my $proxy = ORTestGlobs->new::on('-');
41 my $handle = $proxy->gethandle;
43 is $proxy->getvalue, 'foo', 'correct value written';
44 $handle->autoflush(1);
45 }, undef, 'filehandles - no error during remote handle';
48 my $proxy = ORTestGlobs->new::on('-');
49 my $rhandle = $proxy->getreadhandle($data_file);
50 my @lines = <$rhandle>;
52 is_deeply \@lines, [1 .. 5], 'reading back out of the handle';
53 }, undef, 'filehandles - no error during remote read';
56 my $proxy = ORTestGlobs->new::on('-');
57 my $rhandle = $proxy->getreadhandle($data_file);
59 }, undef, 'filehandles - no errors during binmode';