summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-01-04 15:45:32 -0600
committerJesse Luehrs <doy@tozt.net>2012-01-04 15:45:32 -0600
commit88832730a5f874dbcab08eb8d45f6d6f0c3cec57 (patch)
treee92088dc18b51e6601c4e96a5639d693f1488fe1
parentea1ac96681227f74e585f8aed17f5ac89a7b56fd (diff)
downloadcircular-require-88832730a5f874dbcab08eb8d45f6d6f0c3cec57.tar.gz
circular-require-88832730a5f874dbcab08eb8d45f6d6f0c3cec57.zip
use -hide instead
-rw-r--r--lib/circular/require.pm10
-rw-r--r--t/hide_middleman.t2
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' );