diff options
author | Aaron Crane <arc@cpan.org> | 2015-06-11 13:26:53 +0100 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2015-06-27 20:39:54 +0100 |
commit | 2ad792cd4e9684519736fe03fd28a706b71ceda3 (patch) | |
tree | 0e1c101e674ab7b6d9ce906b36f991ea46f07729 /feature.h | |
parent | e7b6553ad4b9659368147bbbeb7b10a6e141288b (diff) | |
download | perl-2ad792cd4e9684519736fe03fd28a706b71ceda3.tar.gz |
The postderef feature is no longer experimental
As proposed by RJBS.
The "5.24" feature bundle (and therefore C<< use v5.24 >>) now enable
postderef and postderef_qq.
I can't find any precedent for what to do with the relevant experimental::*
warnings category when an experimental feature graduates to acceptance. I
have elected to leave the category in place, so that code doing C<< no
warnings "experimental::postderef" >> will continue to work. This means that
C<< use warnings "experimental::postderef" >> is also accepted, but has no
effect.
Diffstat (limited to 'feature.h')
-rw-r--r-- | feature.h | 34 |
1 files changed, 22 insertions, 12 deletions
@@ -13,6 +13,7 @@ #define FEATURE_BUNDLE_510 1 #define FEATURE_BUNDLE_511 2 #define FEATURE_BUNDLE_515 3 +#define FEATURE_BUNDLE_523 4 #define FEATURE_BUNDLE_CUSTOM (HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT) #define CURRENT_HINTS \ @@ -31,7 +32,8 @@ #define FEATURE_FC_IS_ENABLED \ ( \ - CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \ + (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_515 && \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("fc")) \ ) @@ -39,7 +41,7 @@ #define FEATURE_SAY_IS_ENABLED \ ( \ (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \ - CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("say")) \ ) @@ -47,7 +49,7 @@ #define FEATURE_STATE_IS_ENABLED \ ( \ (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \ - CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("state")) \ ) @@ -55,7 +57,7 @@ #define FEATURE_SWITCH_IS_ENABLED \ ( \ (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \ - CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("switch")) \ ) @@ -68,15 +70,17 @@ #define FEATURE_EVALBYTES_IS_ENABLED \ ( \ - CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \ + (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_515 && \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("evalbytes")) \ ) #define FEATURE_POSTDEREF_IS_ENABLED \ ( \ - CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ - FEATURE_IS_ENABLED("postderef") \ + CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_523 \ + || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ + FEATURE_IS_ENABLED("postderef")) \ ) #define FEATURE_ARYBASE_IS_ENABLED \ @@ -94,7 +98,8 @@ #define FEATURE___SUB___IS_ENABLED \ ( \ - CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \ + (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_515 && \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("__SUB__")) \ ) @@ -113,13 +118,15 @@ #define FEATURE_POSTDEREF_QQ_IS_ENABLED \ ( \ - CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ - FEATURE_IS_ENABLED("postderef_qq") \ + CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_523 \ + || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ + FEATURE_IS_ENABLED("postderef_qq")) \ ) #define FEATURE_UNIEVAL_IS_ENABLED \ ( \ - CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \ + (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_515 && \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("unieval")) \ ) @@ -127,7 +134,7 @@ #define FEATURE_UNICODE_IS_ENABLED \ ( \ (CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_511 && \ - CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_515) \ + CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ FEATURE_IS_ENABLED("unicode")) \ ) @@ -142,6 +149,9 @@ S_enable_feature_bundle(pTHX_ SV *ver) SV *comp_ver = sv_newmortal(); PL_hints = (PL_hints &~ HINT_FEATURE_MASK) | ( + (sv_setnv(comp_ver, 5.023), + vcmp(ver, upg_version(comp_ver, FALSE)) >= 0) + ? FEATURE_BUNDLE_523 : (sv_setnv(comp_ver, 5.015), vcmp(ver, upg_version(comp_ver, FALSE)) >= 0) ? FEATURE_BUNDLE_515 : |