allow scalar refs to be transferred
[scpubgit/Object-Remote.git] / t / transfer.t
CommitLineData
6ed5d580 1use strictures 1;
2use Test::More;
3use Test::Fatal;
4
5$ENV{PERL5LIB} = join(
6 ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib)
7);
8
9use Object::Remote;
10
11my $strA = 'foo';
12my $strB = 'bar';
13
14is exception {
15 my $proxy = ORTestTransfer->new::on('-', value => \$strA);
16 is_deeply $proxy->value, \$strA, 'correct value after construction';
17}, undef, 'no errors during construction';
18
19is exception {
20 my $proxy = ORTestTransfer->new::on('-');
21 $proxy->value(\$strB);
22 is_deeply $proxy->value, \$strB, 'correct value after construction';
23}, undef, 'no errors during attribute set';
24
25done_testing;