-(my $success, my $err_code, undef, undef, my $stderr)
- = run command => [
- $^X,
- map('-I' . $_, @INC),
- '-c',
- 't/data/mixed.d'
- ];
-
-plan skip_all => "Couldn't capture buffers" if $success and not defined $stderr;
-plan tests => $total + 1;
-
-$stderr = join '', @$stderr;
-unless ($success) {
- diag $stderr;
- diag "Failed to execute data file (error $err_code)";
- fail "Couldn't run test $_" for 1 .. $total + 1;
- exit $total + 1;
-}
-
-my %fail = map { $_ => 1 } 2, 3, 5, 7;
-my %failed;
-my $extra_fail = 0;
-
-while ($stderr =~ /^Indirect\s+call\s+of\s+method\s+"([^"]+)"\s+on\s+object\s+"([^"]+)"/mg) {
- my ($m, $o) = ($1, $2);
- my $id;
- if ($o =~ /^P(\d+)$/) {
- $id = $1;
- } else {
- diag "$m $o";
- ++$extra_fail;
+{
+ my $code = do { local $/; <DATA> };
+ my @warns;
+ {
+ local $SIG{__WARN__} = sub { push @warns, join '', 'warn:', @_ };
+ eval "die qq{ok\\n}; $code";