summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-07-07 02:51:45 -0500
committerJesse Luehrs <doy@tozt.net>2011-07-07 02:51:45 -0500
commit0dab6d38d596535a09af16a4feba57358ca67849 (patch)
tree4bf86b089fbff872e305a26acd1fe7d609301746 /lib
parent64e93875cecc7af2d630399eb30fdc2e2cbd27e6 (diff)
downloadsmartmatch-engine-rjbs-0dab6d38d596535a09af16a4feba57358ca67849.tar.gz
smartmatch-engine-rjbs-0dab6d38d596535a09af16a4feba57358ca67849.zip
make this actually lexical
Diffstat (limited to 'lib')
-rw-r--r--lib/smartmatch.pm10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/smartmatch.pm b/lib/smartmatch.pm
index fd15e03..505b7c8 100644
--- a/lib/smartmatch.pm
+++ b/lib/smartmatch.pm
@@ -5,7 +5,6 @@ use warnings;
use parent 'DynaLoader';
use B::Hooks::OP::Check;
-use B::Hooks::EndOfScope;
sub dl_load_flags { 0x01 }
@@ -29,16 +28,11 @@ sub import {
$cb = $engine->can('match') unless ref($cb);
}
- $^H ||= 0x020000; # HINT_LOCALIZE_HH
-
- $package->unimport;
- $^H{'smartmatch_cb'} = smartmatch::register($cb);
- on_scope_end { $package->unimport };
+ smartmatch::register($cb);
}
sub unimport {
- return unless exists $^H{'smartmatch_cb'};
- smartmatch::unregister(delete $^H{'smartmatch_cb'});
+ smartmatch::unregister();
}
1;