From: Jesse Luehrs Date: Sun, 3 Jul 2011 09:18:58 +0000 (-0500) Subject: feature check rather than version check X-Git-Tag: Devel-GlobalDestruction-0.04~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eaac10b57b46f9936111a6bbb524eace807b408e;p=p5sagit%2FDevel-GlobalDestruction.git feature check rather than version check --- diff --git a/Makefile.PL b/Makefile.PL index 7ab9cef..646fbab 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -16,6 +16,6 @@ WriteMakefile( 'Sub::Exporter' => 0, 'Scope::Guard' => 0, }, - ($] >= 5.013007 ? (XS => {}, C => []) : ()), + (defined ${^GLOBAL_PHASE} ? (XS => {}, C => []) : ()), ); diff --git a/lib/Devel/GlobalDestruction.pm b/lib/Devel/GlobalDestruction.pm index 3378882..04efbba 100644 --- a/lib/Devel/GlobalDestruction.pm +++ b/lib/Devel/GlobalDestruction.pm @@ -14,7 +14,7 @@ use Sub::Exporter -setup => { groups => { default => [ -all ] }, }; -if ($] >= 5.013007) { +if (defined ${^GLOBAL_PHASE}) { eval 'sub in_global_destruction () { ${^GLOBAL_PHASE} eq q[DESTRUCT] }'; } else {