12 use Test::More tests => 56 * 8;
14 my ($obj, $pkg, $cb, $x, @a);
26 local $SIG{__WARN__} = sub { push @warns, @_ };
37 my ($skip, $prefix) = split /#+/, $1;
38 $skip = 0 unless defined $skip;
39 $prefix = '' unless defined $prefix;
44 skip "$_: $skip" => 8 if eval $skip;
47 try "return; $prefix; use indirect; $_";
48 is $@, '', "use indirect: $_";
49 is @warns, 0, 'no reports';
51 try "return; $prefix; no indirect; $_";
52 is $@, '', "no indirect: $_";
53 is @warns, 0, 'no reports';
60 try "return; $prefix; use indirect; $_";
61 is $@, '', "use indirect, defined: $_";
62 is @warns, 0, 'no reports';
64 try "return; $prefix; no indirect; $_";
65 is $@, '', "no indirect, defined: $_";
66 is @warns, 0, 'no reports';
80 $obj = Hlagh->new(q{foo}, bar => $obj);
84 $obj = Hlagh -> new ( ) ;
86 $obj = Hlagh -> new ( 1 ) ;
88 $obj = Hlagh -> new ( 'foo' , bar => $obj );
111 $obj = new->new; # new new
121 $obj = Hlagh->$cb($pkg);
123 $obj = Hlagh->$cb(sub { 'foo' }, bar => $obj);
127 $obj = $pkg -> new ( );
146 $obj = $pkg -> ($cb) ();
148 $obj = $pkg->$cb( $obj );
150 $obj = $pkg->$cb(qw/foo bar baz/);
163 #### $] < 5.010 # use feature 'state'; state $z
165 #### $] < 5.010 # use feature 'state'; state $z
179 #### $] < 5.010 # use feature 'state'; state $z
181 #### $] < 5.010 # use feature 'state'; state $z
184 print STDOUT "bananananananana\n";
188 $obj = "apple ${\(new Hlagh)} pear"
190 $obj = "apple @{[new Hlagh]} pear"