#!perl
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 6;
use Tie::Scalar;
is(eval{ $o->bar($x) }, 42)
or diag("Error: $@");
+$o = eval{
+ ts_init(my $a, 10);
+ ts_init(my $b, 42);
+ MyClass->new(foo => $a, bar => $b);
+};
+ok $o;
+is eval{ $o->foo }, 10;
+is eval{ $o->bar }, 42;