summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/hide_middleman2.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/hide_middleman2.t b/t/hide_middleman2.t
new file mode 100644
index 0000000..917674b
--- /dev/null
+++ b/t/hide_middleman2.t
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib 't/hide_middleman';
+use Test::More;
+
+no circular::require -hide => ['base', 'parent'];
+
+my @warnings;
+
+{
+ $SIG{__WARN__} = sub { push @warnings => @_ };
+
+ use_ok( 'Foo' );
+}
+
+is_deeply(
+ \@warnings,
+ ["Circular require detected: Foo.pm (from Bar)\n"],
+ "Show the module that used base, instead of 'base' when a cycle occurs from a use base."
+);
+
+done_testing;