diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-01-04 15:49:30 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-01-04 15:49:30 -0600 |
commit | 8322efee06fbf44b8a8fa3717f933bae3632073d (patch) | |
tree | 0ae6074f7d0f8df8d9592df6182ffd28adb86da8 | |
parent | 8536b78f5d3792fe8113c17b0ae213432d5e654c (diff) | |
download | circular-require-8322efee06fbf44b8a8fa3717f933bae3632073d.tar.gz circular-require-8322efee06fbf44b8a8fa3717f933bae3632073d.zip |
add test for arrayref form
-rw-r--r-- | t/hide_middleman2.t | 23 |
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; |