From: Matt S Trout Date: Thu, 22 Oct 2009 10:11:44 +0000 (-0400) Subject: comment this up the arseholes X-Git-Tag: v0.003~77 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=623466840fcb5aff4788fa80ee12947853e908e1;hp=06e0b420b681530537f3bf83848033836e5918b1;p=catagits%2FWeb-Simple.git comment this up the arseholes --- diff --git a/lib/XML/Tags.pm b/lib/XML/Tags.pm index 78cc5d2..40f6926 100644 --- a/lib/XML/Tags.pm +++ b/lib/XML/Tags.pm @@ -39,6 +39,12 @@ sub _find_target { } sub _set_glob { + # stupid insanity. delete anything already there so we disassociated + # the *CORE::GLOBAL::glob typeglob. Then the compilation of the eval + # revivifies it - i.e. creates us a new glob, which we get a reference + # to, which we can then assign to. + # doing it without the eval doesn't - it binds to the version in scope + # at compile time, which means after a delete you get a nice warm segv. delete ${CORE::GLOBAL::}{glob}; *{eval '\*CORE::GLOBAL::glob'} = $_[0]; }