]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/30-scope.t
Add undef guards to $stderr in tests
[perl/modules/indirect.git] / t / 30-scope.t
index b9c71545dd1ede3a5627eea26f4c74a3a01ca944..e4d667c33d6ab5fbdc25956ee81142c575fd3c6c 100644 (file)
@@ -13,6 +13,7 @@ use IPC::Cmd qw/run/;
  = run command => [
           $^X,
           map('-I' . $_, @INC),
+          $ENV{PERL5OPT} || '',
           '-c',
           't/data/mixed.d'
    ];
@@ -20,7 +21,7 @@ use IPC::Cmd qw/run/;
 plan skip_all => "Couldn't capture buffers" if $success and not defined $stderr;
 plan tests => $total + 1;
 
-$stderr = join '', @$stderr;
+$stderr = join '', @{$stderr || []};
 unless ($success) {
  diag $stderr;
  diag "Failed to execute data file (error $err_code)";