diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-01-06 11:11:12 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-01-06 11:11:12 -0600 |
commit | 271509d85b3b1baa8480551b4cdcfe40fdbab5c4 (patch) | |
tree | 761ffd69fe02e09264cabb46dde21ee90cfb4381 /lib | |
parent | e17323538f7f49e7371f5e92bd2ab87f6a838e7d (diff) | |
download | circular-require-271509d85b3b1baa8480551b4cdcfe40fdbab5c4.tar.gz circular-require-271509d85b3b1baa8480551b4cdcfe40fdbab5c4.zip |
deleting CORE::GLOBAL::require on disabling isn't what we want
the binding happens at compile time, so deleting it after the 'require'
call is already bound to CORE::GLOBAL::require (rather than to the
keyword) causes it to fail
Diffstat (limited to 'lib')
-rw-r--r-- | lib/circular/require.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/circular/require.pm b/lib/circular/require.pm index 881aec7..dcb138a 100644 --- a/lib/circular/require.pm +++ b/lib/circular/require.pm @@ -132,7 +132,7 @@ sub import { $stash->add_package_symbol('&require' => $saved_require_hook); } else { - $stash->remove_package_symbol('&require'); + $stash->add_package_symbol('&require' => sub { CORE::require(@_) }); } # not delete, because we want to see it being explicitly disabled $^H{'circular::require'} = 0; |