X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=t%2Fbasic.t;h=329f606cfeaf0b79638e7d08f0626d7c2f941f80;hp=4529e5502def9b541fc33f20b7f07aebf48542de;hb=dd6e1327e96d5488e34f7519d9d3290627c9bbe8;hpb=c6fe6fbd88a05e860ecdc8942cb86940915172ed diff --git a/t/basic.t b/t/basic.t index 4529e55..329f606 100644 --- a/t/basic.t +++ b/t/basic.t @@ -2,21 +2,19 @@ use strictures 1; use Test::More; use Sys::Hostname qw(hostname); -use Object::Remote::Connector::Local; +$ENV{OBJECT_REMOTE_TEST_LOGGER} = 1; + use Object::Remote; $ENV{PERL5LIB} = join( ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib) ); -my $connection = Object::Remote::Connector::Local->new->connect; +my $connection = Object::Remote->connect('-'); #$Object::Remote::Connection::DEBUG = 1; -my $remote = Object::Remote->new( - connection => $connection, - class => 'ORTestClass' -); +my $remote = ORTestClass->new::on($connection); isnt($$, $remote->pid, 'Different pid on the other side'); @@ -33,7 +31,7 @@ is($remote->call_callback(27, sub { $x++ }), 27, "Callback ok"); is($x, 1, "Callback called callback"); is( - $connection->get_remote_sub('Sys::Hostname::hostname')->(), + Sys::Hostname->can::on($connection, 'hostname')->(), hostname(), 'Remote sub call ok' );