make note about deadlock when moving position of timer execution
[scpubgit/Object-Remote.git] / t / objects.t
1 use strictures 1;
2 use Test::More;
3 use Sys::Hostname qw(hostname);
4 use overload ();
5
6 use Object::Remote;
7
8 $ENV{PERL5LIB} = join(
9   ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib)
10 );
11
12 my $connection = Object::Remote->connect('-');
13
14 my $ortestobj_j = ORTestObjects->new::on($connection, { name => 'John' });
15 my $ortestobj_k = ORTestObjects->new::on($connection, { name => 'Ken' });
16
17 is($ortestobj_k->takes_object($ortestobj_j), 1, 'Passed correct object back over the wire');
18
19 my $george = ORTestObjects->new::on($connection, { name => 'George'});
20 my $george_again = $george->give_back;
21 is($george->{remote}, $george_again->{remote}, 'objects appear to be the same');
22 is($george->name, $george_again->name, 'objects have the same name');
23
24 done_testing;