12 use Test::More tests => 52 * 4;
14 my ($obj, $pkg, $cb, $x, @a);
24 my ($skip, $prefix) = split /#+/, $1;
25 $skip = 0 unless defined $skip;
26 $prefix = '' unless defined $prefix;
31 skip "$_: $skip" => 4 if eval $skip;
33 local $SIG{__WARN__} = sub { die 'warn:' . join(' ', @_) };
35 eval "die qq{ok\\n}; $prefix; use indirect; $_";
36 is($@, "ok\n", "use indirect: $_");
38 eval "die qq{ok\n}; $prefix; no indirect; $_";
39 is($@, "ok\n", "no indirect: $_");
43 eval "die qq{ok\\n}; $prefix; use indirect; $_";
44 is($@, "ok\n", "use indirect, defined: $_");
46 eval "die qq{ok\\n}; $prefix; no indirect; $_";
47 is($@, "ok\n", "no indirect, defined: $_");
60 $obj = Hlagh->new(q{foo}, bar => $obj);
64 $obj = Hlagh -> new ( ) ;
66 $obj = Hlagh -> new ( 1 ) ;
68 $obj = Hlagh -> new ( 'foo' , bar => $obj );
93 $obj = Hlagh->$cb($pkg);
95 $obj = Hlagh->$cb(sub { 'foo' }, bar => $obj);
99 $obj = $pkg -> new ( );
118 $obj = $pkg -> ($cb) ();
120 $obj = $pkg->$cb( $obj );
122 $obj = $pkg->$cb(qw/foo bar baz/);
150 #### $] < 5.010 # use feature 'state'; state $z
152 #### $] < 5.010 # use feature 'state'; state $z
166 #### $] < 5.010 # use feature 'state'; state $z
168 #### $] < 5.010 # use feature 'state'; state $z
171 print STDOUT "bananananananana\n";
175 $obj = "apple ${\(new Hlagh)} pear"
177 $obj = "apple @{[new Hlagh]} pear"