__SUB__ => '__SUB__',
);
+my $feature_bundle_mask = 0x1c000000;
+
sub keyword {
my $self = shift;
my $name = shift;
return $name if $name =~ /^CORE::/; # just in case
if (exists $feature_keywords{$name}) {
+ my $hh;
+ my $hints = $self->{hints} & $feature_bundle_mask;
+ if ($hints && $hints != $feature_bundle_mask) {
+ require feature;
+ local $^H = $self->{hints};
+ # Shh! Keep quite about this function. It is not to be
+ # relied upon.
+ $hh = { map +($_ => 1), feature::current_bundle() };
+ }
+ elsif ($hints) { $hh = $self->{'hinthash'} }
return "CORE::$name"
- if !$self->{'hinthash'}
- || !$self->{'hinthash'}{"feature_$feature_keywords{$name}"}
+ if !$hh
+ || !$hh->{"feature_$feature_keywords{$name}"}
}
if (
$name !~ /^(?:chom?p|do|exec|glob|s(?:elect|ystem))\z/
CORE::evalbytes '';
() = CORE::__SUB__;
####
+# feature features when feature has been disabled by use VERSION
+use feature (sprintf(":%vd", $^V));
+use 1;
+CORE::state $x;
+CORE::say $x;
+CORE::given ($x) {
+ CORE::when (3) {
+ continue;
+ }
+ CORE::default {
+ CORE::break;
+ }
+}
+CORE::evalbytes '';
+() = CORE::__SUB__;
+>>>>
+BEGIN {
+ $^H{'feature___SUB__'} = '1';
+ $^H{'feature_unieval'} = '1';
+ $^H{'feature_unicode'} = '1';
+ $^H{'feature_evalbytes'} = '1';
+}
+CORE::state $x;
+CORE::say $x;
+CORE::given ($x) {
+ CORE::when (3) {
+ continue;
+ }
+ CORE::default {
+ CORE::break;
+ }
+}
+CORE::evalbytes '';
+() = CORE::__SUB__;
+####
# $#- $#+ $#{%} etc.
my @x;
@x = ($#{`}, $#{~}, $#{!}, $#{@}, $#{$}, $#{%}, $#{^}, $#{&}, $#{*});