fix bug that allowed forwarded logs to be output from the logger built via env vars
[scpubgit/Object-Remote.git] / t / objects.t
CommitLineData
6b353e96 1use strictures 1;
2use Test::More;
3use Sys::Hostname qw(hostname);
4use overload ();
5
6use Object::Remote;
7
8$ENV{PERL5LIB} = join(
9 ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib)
10);
11
12my $connection = Object::Remote->connect('-');
13
14my $ortestobj_j = ORTestObjects->new::on($connection, { name => 'John' });
15my $ortestobj_k = ORTestObjects->new::on($connection, { name => 'Ken' });
16
17is($ortestobj_k->takes_object($ortestobj_j), 1, 'Passed correct object back over the wire');
18
19my $george = ORTestObjects->new::on($connection, { name => 'George'});
20my $george_again = $george->give_back;
21is($george->{remote}, $george_again->{remote}, 'objects appear to be the same');
22is($george->name, $george_again->name, 'objects have the same name');
23
24done_testing;