t/lib/indirect/TestRequired2.pm
t/lib/indirect/TestRequired3X.pm
t/lib/indirect/TestRequired3Y.pm
+t/lib/indirect/TestRequired4/a0.pm
+t/lib/indirect/TestRequired4/b0.pm
+t/lib/indirect/TestRequired4/c0.pm
my $tests;
BEGIN { $tests = 18 }
-use Test::More tests => (1 + $tests + 1) + 3 + 3 + 3 + 5 + 4 + 1;
+use Test::More tests => (1 + $tests + 1) + 3 + 3 + 3 + 5 + 4 + 2;
BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} }
is $@, '', 'RT #47902';
}
+{
+ my $err = eval <<' SNIP';
+ use indirect::TestRequired4::a0;
+ indirect::TestRequired4::a0::error();
+ SNIP
+ like $err, qr/^Can't locate object method "new" via package "X"/, 'RT #50570';
+}
+
__DATA__
my $a = new P1;
--- /dev/null
+package indirect::TestRequired4::a0;
+no indirect ":fatal";
+use indirect::TestRequired4::b0;
+sub error {
+ indirect::TestRequired4::b0->get;
+ return $@;
+}
+1;
--- /dev/null
+package indirect::TestRequired4::b0;
+sub get {
+ eval 'require indirect::TestRequired4::c0';
+}
+1;
--- /dev/null
+package indirect::TestRequired4::c0;
+new X;
+1;