Before the recent feature revamp (
2fc860ee1e0), loading the
unicode_strings feature would always set the feature_unicode %^H ele-
ment, even though the core did not actually use it. Now it is some-
times not set. So we have to check the hint bits as well. Since
feature.pm has it hardcoded, load feature.pm to get the right bit.
The stuff with $feature_bundle_mask is redundant, but it avoids load-
ing feature.pm unnecessarily.
# The /d flag is indicated by 0; only show it if necessary.
elsif ($self->{hinthash} and
$self->{hinthash}{reflags_charset}
- || $self->{hinthash}{feature_unicode}) {
+ || $self->{hinthash}{feature_unicode}
+ or $self->{hints} & $feature_bundle_mask
+ && ($self->{hints} & $feature_bundle_mask)
+ != $feature_bundle_mask
+ && do {
+ require feature;
+ $self->{hints} & $feature::hint_uni8bit;
+ }
+ ) {
$flags .= 'd';
}
$flags;
use re "/u";
print /a/d, s/b/c/d;
}
+{
+ use 5.012;
+ print /a/d, s/b/c/d;
+}
>>>>
print /a/a, s/b/c/a;
print /a/aa, s/b/c/aa;
$^H{'reflags_charset'} = '2'; }
print /a/d, s/b/c/d;
}
+{
+ no feature;
+ use feature ':5.12';
+ print /a/d, s/b/c/d;
+}
####
# Test @threadsv_names under 5005threads
foreach $' (1, 2) {