TT support
[scpubgit/HTML-String.git] / lib / HTML / String / Overload.pm
index e5f7c72..1191c4a 100644 (file)
@@ -3,13 +3,15 @@ package HTML::String::Overload;
 use strictures 1;
 use HTML::String;
 use B::Hooks::EndOfScope;
-use overload '';
+use overload ();
 
 sub import {
-  overload::constant q => \&html;
-  on_scope_end {
+    overload::constant q => \&html;
+    on_scope_end { __PACKAGE__->unimport };
+}
+
+sub unimport {
     overload::remove_constant('q');
-  }
 }
 
 1;