t/lib/indirect/Test3.pm
t/lib/indirect/Test4.pm
t/lib/indirect/Test5.pm
+t/lib/indirect/TestCompilationError.pm
t/lib/indirect/TestRequired1.pm
t/lib/indirect/TestRequired2.pm
t/lib/indirect/TestRequired3X.pm
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 5;
use lib 't/lib';
use VPIT::TestHelpers 'capture';
my $core_err1 = qr/Global symbol "\$bar"/;
my $core_err2 = qr/Global symbol "\$ook"/;
my $aborted = qr/Execution of -e aborted due to compilation errors\./;
+my $failed_req = qr/Compilation failed in require/;
my $line_end = qr/[^\n]*\n/;
my $compile_err_warn_exp = qr/$indirect_msg$line_end$core_err2$line_end/o;
my $compile_err_fatal_exp = qr/$core_err1$line_end$indirect_msg$line_end/o;
like $@, qr/\A$compile_err_fatal_exp\z/o,
'no indirect fatal does not hide compilation errors inside of eval';
}
+
+{
+ local $@;
+ eval { require indirect::TestCompilationError };
+ like $@, qr/\A$compile_err_fatal_exp$failed_req$line_end\z/o,
+ 'no indirect fatal does not hide compilation errors inside of require';
+}