From: Florian Ragwitz <rafl@debian.org>
Date: Sat, 4 Oct 2008 02:32:03 +0000 (+0000)
Subject: Revert "nuke PERL_5_9_PLUS"
X-Git-Tag: 0.005000~79
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e38f5a74a0674263f305ff8228b347171ae4658d;p=p5sagit%2FDevel-Declare.git

Revert "nuke PERL_5_9_PLUS"

Using #ifdef PL_parser is not enough. In some perls, depending on
configuration, PL_parser is a real symbol and not a define.
---

diff --git a/Changes b/Changes
index bdbd9d2..619e00e 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,5 @@
 Changes for Devel-Declare
 
-  - eliminate PERL_5_9_PLUS macro in favour of ifdef PL_parser
   - clean up checks for whether we're lexing and whether lex_stuff exists
     to handle the PL_parser factor-out in 5.10
 
diff --git a/stolen_chunk_of_toke.c b/stolen_chunk_of_toke.c
index ab1a384..2347cc7 100644
--- a/stolen_chunk_of_toke.c
+++ b/stolen_chunk_of_toke.c
@@ -83,7 +83,11 @@ STATIC char*    S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow
 #define PERL_5_8_8_PLUS
 #endif
 
-#ifdef PL_parser
+#if PERL_REVISION == 5 && PERL_VERSION > 8
+#define PERL_5_9_PLUS
+#endif
+
+#ifdef PERL_5_9_PLUS
 /* 5.9+ moves a bunch of things to a PL_parser struct so we need to
    declare the backcompat macros for things to still work (mst) */