From 88832730a5f874dbcab08eb8d45f6d6f0c3cec57 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 4 Jan 2012 15:45:32 -0600 Subject: use -hide instead --- lib/circular/require.pm | 10 +++++----- 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 and C, for instance. To avoid these -modules showing up as the source of cycles, you can use the C 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' ); -- cgit v1.2.3