- skip "$_: $skip" => 4 if eval $skip;
-
- local $SIG{__WARN__} = sub { die 'warn:' . join(' ', @_) };
-
- eval "die qq{ok\\n}; $prefix; use indirect; $_";
- is($@, "ok\n", "use indirect: $_");
-
- eval "die qq{ok\n}; $prefix; no indirect; $_";
- is($@, "ok\n", "no indirect: $_");
-
- s/Hlagh/Dongs/g;
-
- eval "die qq{ok\\n}; $prefix; use indirect; $_";
- is($@, "ok\n", "use indirect, defined: $_");
-
- eval "die qq{ok\\n}; $prefix; no indirect; $_";
- is($@, "ok\n", "no indirect, defined: $_");
+ skip "$_: $skip" => 8 if eval $skip;
+
+ {
+ try "return; $prefix; use indirect; $_";
+ is $@, '', "use indirect: $_";
+ is @warns, 0, 'no reports';
+
+ try "return; $prefix; no indirect; $_";
+ is $@, '', "no indirect: $_";
+ is @warns, 0, 'no reports';
+ }
+
+ {
+ local $_ = $_;
+ s/Hlagh/Dongs/g;
+
+ try "return; $prefix; use indirect; $_";
+ is $@, '', "use indirect, defined: $_";
+ is @warns, 0, 'no reports';
+
+ try "return; $prefix; no indirect; $_";
+ is $@, '', "no indirect, defined: $_";
+ is @warns, 0, 'no reports';
+ }