| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Also correct the description of lvref magic. When it was first added,
it was for list assignments only, but that soon changed.
|
|
|
|
| |
The other experimental features already have nice warnings in feature.pm
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The term 'semantics' in documentation when applied to character sets is
changed to 'rules' as being a shorter less-jargony synonym in this case.
This was discussed several releases ago, but I didn't get around to it.
|
|
|
|
|
|
|
|
|
|
| |
Declarative syntax to unwrap argument list into lexical variables.
"sub foo ($a,$b) {...}" checks number of arguments and puts the
arguments into lexical variables. Signatures are not equivalent to the
existing idiom of "sub foo { my($a,$b) = @_; ... }". Signatures are only
available by enabling a non-default feature, and generate warnings about
being experimental. The syntactic clash with prototypes is managed by
disabling the short prototype syntax when signatures are enabled.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
feature.pm has an ":all" tag. So if we warn when lexical subs are
enabled, then ‘use feature ":all"’ will also warn. That’s unkind.
Instead, warn when a lexical sub is declared via
‘my/our/state sub...’.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We had a field report of lack of clarity around this, so add some
text.
|
|
|
|
|
|
| |
Since the 5.18 feature bundle should be added long before 5.18, to
avoid last-minute blunders, and since it’s easy to forget to do it in
advance, have feature.pl do it automatically.
|
| |
|
|
|
|
|
| |
current_bundle() was added after 5.14.0 was released, so has never been in
a stable release. Hence it's totally safe to kill it.
|
|
|
|
|
| |
normalise_hints() was added after 5.14.0 was released, so has never been in
a stable release. Hence it's totally safe to kill it.
|
| |
|
|
|
|
|
|
|
|
|
| |
There were a couple of inconsistencies (shift with/without an explicit @_,
exists with/without(), !@_ vs @_ == 0) which turn out to date back to
before 5.10.0
Also fix an inadvertent use of a single element array slice with a simple
array lookup in current_bundle().
|
|
|
|
|
|
|
|
|
| |
‘Normalise’ in this case means to set $^H to indicate that features
are in %^H (FEATURE_BUNDLE_CUSTOM) and to make %^H contain the current
feature set.
Since ‘no feature’ sets the default feature bundle in $^H, this is
unnecessary in that case.
|
|
|
|
|
|
|
|
|
| |
See https://rt.perl.org/rt3/Ticket/Display.html?id=108776
"no feature" now resets to the default feature set. To disable all
features (which is likely to be a pretty special-purpose request, since
it presumably won't match any named set of semantics) you can now
write "no feature ':all'"
|
|
|
|
|
|
|
|
|
|
| |
As described in the pod changes in this commit, this changes quotemeta()
to consistenly quote non-ASCII characters when used under
unicode_strings. The behavior is changed for these and UTF-8 encoded
strings to more closely align with Unicode's recommendations.
The end result is that we *could* at some future point start using other
characters as metacharacters than the 12 we do now.
|
|
|
|
| |
It doesn't do anything yet.
|
| |
|
|
|
|
|
|
|
|
|
| |
When a version declaration has been seen, it’s not possible to deparse
the code perfectly correctly, but using ‘no feature; use feature
"5.14"’ is a reasonable tradeoff. See also commit 1c74777c25.
This necessitated sorting %^H keys that are output to keep tests pass-
ing. Previously they were relying on phases of the moon.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PL_hints/$^H can hold feature bundle hints that cause %^H to be
ignored when features are looked up.
When feature->import and ->unimport are invoked, they set bits in $^H
such that %^H is used once more. But they have to modify %^H to con-
tain what the bits in $^H imply.
Up till now, unimport was delegating to import, which meant that more
work was being done than necessary, because import would then detect
the special condition of $^H and repeat (some of) that work.
|
|
|
|
|
|
|
|
|
|
| |
Now ‘use v5.22’ and ‘use 5.005’ no longer have to load feature.pm
to enable the current feature bundle. All they do is twiddle bits
in PL_hints.
Since version declarations no longer call feature->unimport, there
may be junk left over in %^H (which we leave for speed’s sake), so
feature.pm has to delete that junk before enabling features.
|
|
|
|
|
|
| |
Now that we have hints in $^H to indicate the default feature bun-
dle, there is no need for entries in %^H that turn features off by
their presence.
|
|
|
|
|
|
|
|
|
|
| |
The core does not use these hints just yet, but feature.pm can start
setting them.
Currently, the hint bits for feature bundles (CURRENT_FEATURE_BUNDLE
in feature.h) are equal to FEATURE_BUNDLE_DEFAULT (0) by default.
feature.pm sets them to FEATURE_BUNDLE_CUSTOM when modifying
hint settings.
|
|
|
|
|
|
| |
This is for when we switch over to using hints in $^H for feature bun-
dles. When $bundle_number == $hint_mask, it means that the hints in
%^H apply.
|
|
|
|
|
| |
It’s going to need them, in order to determine which list of features
is currently enabled.
|
|
|
|
| |
This will make it possible to create macros for each.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
%UniqueBundles was added for generating constants in feature.h, but
we can use it for feature.pm’s %feature_bundle as well, simplify-
ing the code.
This eliminates this piece of code in feature.pm, spelling it
out longhand:
# Each of these is the same as the previous bundle
for (12,13,14,16) {
$feature_bundle{"5.$_"} = $feature_bundle{"5.".($_-1)}
}
While that code might be neat, it would make the generation code
unduly complex. (It was designed for hand-editing anyway.)
|
|
|
|
|
| |
This script generates lib/feature.pm. Soon it will be made to gener-
ate other files, too.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the array_base feature to feature.pm
Perl_feature_is_enabled has been modified to use PL_curcop, rather
than PL_hintgv, so it can work with run-time hints as well.
(PL_curcop holds the current state op at run time, and &PL_compiling
at compile time, so it works for both.) The hints in $^H are not
stored in the same place at compile time and run time, so the FEATURE_IS_ENABLED macro has been modified to check first whether
PL_curop == &PL_compiling.
Since array_base is on by default with no hint for it in %^H, it is
a ‘negative’ feature, whose entry in %^H turns it off. feature.pm
has been modified to support such negative features. The new FEATURE_IS_ENABLED_d can check whether such default features
are enabled.
This does make things less efficient, as every version declaration
now loads feature.pm to disable all features (including turning off
array_base, which entails adding an entry to %^H) before loading the
new bundle. I have plans to make this more efficient.
|
| |
|
| |
|
| |
|
| |
|
| |
|