diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-03-31 13:50:04 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-04-03 08:46:03 -0700 |
commit | d1718a7cf54f01c3c9d449a1ea96c9bba32d1126 (patch) | |
tree | e8589072ca6d679a871b14f215413bc51da4a517 /perl.h | |
parent | 6331a2f5f6ee89f25cb6803c1d9ef97d6d1799e5 (diff) | |
download | perl-d1718a7cf54f01c3c9d449a1ea96c9bba32d1126.tar.gz |
[perl #111462] Move strict hints from %^H to $^H
With commit b50b20584, strict.pm starting putting hints in %^H to
indicate that strict mode has been enabled or disabled explicitly, so
version declarations should not change the setting.
This causes ‘Unbalanced string table refcount’ warnings when Safe.pm
encounters prohibited ops.
This happens because ops are leaking when those ops point to HEKs (in
the internal form that %^H takes when attached to ops).
This commit moves those new strict hints into $^H, to avoid those
warnings. This does simply paper over the real problem (leaked ops),
but at least it gets the warnings back down to the 5.14 amount.
Because of the new hints in $^H, B::Concise has been updated to
account for them, and so have all its tests. I modified OptreeCheck
to avoid setting the hints with ‘no strict;’, as that resulted in
slightly fewer changes to the tests. It will also result in fewer
changes to the tests in future.
Two B::Deparse tests started failing due to %^H not being localised.
Apparently there is a bug somewhere (in perl, Deparse.pm or deparse.t)
that got triggered as a result. In fact, one of the tests exhibited
*two* bugs. But for now, I’ve simply added a workaround to the two
tests so they don’t trigger those bugs (which bugs will have to wait
till after 5.16).
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4848,6 +4848,11 @@ typedef enum { #define HINT_FEATURE_MASK 0x1c000000 /* 3 bits for feature bundles */ +#define HINT_EXPLICIT_STRICT_REFS 0x20000000 /* strict.pm */ +#define HINT_EXPLICIT_STRICT_SUBS 0x40000000 /* strict.pm */ +#define HINT_EXPLICIT_STRICT_VARS 0x80000000 /* strict.pm */ + + /* The following are stored in $^H{sort}, not in PL_hints */ #define HINT_SORT_SORT_BITS 0x000000FF /* allow 256 different ones */ #define HINT_SORT_QUICKSORT 0x00000001 |