diff options
-rw-r--r-- | lib/circular/require.pm | 10 | ||||
-rw-r--r-- | t/hide_middleman.t | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/circular/require.pm b/lib/circular/require.pm index eb1f21d..b7f71c2 100644 --- a/lib/circular/require.pm +++ b/lib/circular/require.pm @@ -37,14 +37,14 @@ module has not finished executing. In some situations, other modules might be handling the module loading for you - C<use base> and C<Class::Load::load_class>, for instance. To avoid these -modules showing up as the source of cycles, you can use the C<hide> parameter +modules showing up as the source of cycles, you can use the C<-hide> parameter when using this module. For example: - no circular::require hide => [qw(base parent Class::Load)]; + no circular::require -hide => [qw(base parent Class::Load)]; or - perl -M'-circular::require hide => [qw(base parent Class::Load)];' foo.pl + perl -M'-circular::require -hide => [qw(base parent Class::Load)];' foo.pl =cut @@ -102,8 +102,8 @@ sub unimport { my $class = shift; my %params = @_; - @hide = ref($params{'hide'}) ? @{ $params{'hide'} } : ($params{'hide'}) - if exists $params{'hide'}; + @hide = ref($params{'-hide'}) ? @{ $params{'-hide'} } : ($params{'-hide'}) + if exists $params{'-hide'}; my $stash = Package::Stash->new('CORE::GLOBAL'); my $old_require = $stash->get_package_symbol('&require'); diff --git a/t/hide_middleman.t b/t/hide_middleman.t index d0cf652..0fa7514 100644 --- a/t/hide_middleman.t +++ b/t/hide_middleman.t @@ -9,7 +9,7 @@ my @warnings; $SIG{__WARN__} = sub { push @warnings => @_ }; # Test passes if you comment this out -no circular::require hide => 'base'; +no circular::require -hide => 'base'; use_ok( 'Foo' ); |