From 8322efee06fbf44b8a8fa3717f933bae3632073d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 4 Jan 2012 15:49:30 -0600 Subject: add test for arrayref form --- t/hide_middleman2.t | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 t/hide_middleman2.t 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; -- cgit v1.2.3-54-g00ecf