From: Graham Knop Date: Fri, 1 Feb 2013 21:26:30 +0000 (-0500) Subject: add comment to explain use of main_start X-Git-Tag: Devel-GlobalDestruction-0.10~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=23135b02f4a06a25ad3626ca40d8c171b379f25f;p=p5sagit%2FDevel-GlobalDestruction.git add comment to explain use of main_start --- diff --git a/lib/Devel/GlobalDestruction.pm b/lib/Devel/GlobalDestruction.pm index e54d757..25b8958 100644 --- a/lib/Devel/GlobalDestruction.pm +++ b/lib/Devel/GlobalDestruction.pm @@ -26,6 +26,8 @@ elsif (eval { # the eval already installed everything, nothing to do } else { + # internally, PL_main_start is nulled immediately before entering global destruction + # and we can use B to detect that require B; eval 'sub in_global_destruction () { B::main_start()->isa(q[B::NULL]) }; 1' or die $@;