summaryrefslogtreecommitdiff
path: root/lib/feature.pm
Commit message (Collapse)AuthorAgeFilesLines
* Rename lvalue referencesFather Chrysostomos2014-10-171-4/+4
| | | | | Also correct the description of lvref magic. When it was first added, it was for list assignments only, but that soon changed.
* mention 'switch' is experimental in feature.pmDoug Bell2014-10-171-0/+6
| | | | The other experimental features already have nice warnings in feature.pm
* Document lvalue referencesFather Chrysostomos2014-10-111-0/+23
|
* Increase $feature::VERSION to 1.38Father Chrysostomos2014-10-101-1/+1
|
* Add lvalue_refs feature featureFather Chrysostomos2014-10-101-1/+2
|
* add a 5.21 feature bundleRicardo Signes2014-05-261-1/+6
|
* Change 'semantics' to 'rules'Karl Williamson2014-02-201-3/+3
| | | | | | 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.
* subroutine signaturesZefram2014-02-011-2/+23
| | | | | | | | | | 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.
* Add postderef_qq feature featureFather Chrysostomos2013-10-051-1/+2
|
* Increase $feature::VERSION to 1.34Father Chrysostomos2013-10-051-1/+1
|
* Add postderef feature featureFather Chrysostomos2013-10-051-1/+2
|
* regen feature.pmRicardo Signes2013-05-181-1/+6
|
* Increase $feature::VERSION to 1.32Father Chrysostomos2012-11-241-1/+1
|
* Warn when declaring lexsubs, not when enabling themFather Chrysostomos2012-11-241-10/+2
| | | | | | | | 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...’.
* Increase $feature::VERSION to 1.31Father Chrysostomos2012-09-301-1/+1
|
* Use two colons for lexsub warningFather Chrysostomos2012-09-301-2/+2
|
* Document lexical subsFather Chrysostomos2012-09-151-0/+14
|
* Add experimental lexical_subs featureFather Chrysostomos2012-09-151-1/+10
|
* feature.pm: Missing spaceFather Chrysostomos2012-09-151-1/+1
|
* Increase $feature::VERSION to 1.30Father Chrysostomos2012-09-151-1/+1
|
* docs patch: 'unicode_strings' doesn't change utf8nessKarl Williamson2012-06-071-2/+3
| | | | | We had a field report of lack of clarity around this, so add some text.
* feature.pl: Make 5.even bundle imply 5.oddFather Chrysostomos2012-05-211-0/+4
| | | | | | 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.
* add the 5.17 feature bundleRicardo Signes2012-05-201-1/+2
|
* In feature.pm, inline current_bundle() into __common(), its only caller.Nicholas Clark2012-03-191-7/+4
| | | | | 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.
* In feature.pm, inline normalise_hints() into __common(), its only caller.Nicholas Clark2012-03-191-11/+7
| | | | | 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.
* Merge the code common to feature::import and feature::unimport.Nicholas Clark2012-03-191-24/+11
|
* In feature.pm, use a consistent code style in import() and unimport().Nicholas Clark2012-03-191-5/+6
| | | | | | | | | 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().
* Don’t ‘normalise’ hints for bare ‘no feature’Father Chrysostomos2012-02-251-5/+5
| | | | | | | | | ‘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.
* "no feature" now means reset to defaultRicardo Signes2012-02-221-7/+8
| | | | | | | | | 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'"
* perl #77654: quotemeta quotes non-ASCII consistentlyKarl Williamson2012-02-151-2/+2
| | | | | | | | | | 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.
* Add the fc keyword in regen/feature.plBrian Fraser2012-01-291-3/+13
| | | | It doesn't do anything yet.
* Correct links to perlsyn and perlopFather Chrysostomos2012-01-051-1/+1
|
* Deparse implicit with ‘use feature’Father Chrysostomos2011-12-241-4/+4
| | | | | | | | | 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.
* feature.pm: Move hint normalisation to separate functionFather Chrysostomos2011-12-241-10/+13
| | | | | | | | | | | | | 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.
* op.c: Use new feature bundle hintsFather Chrysostomos2011-12-241-1/+5
| | | | | | | | | | 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.
* Eliminate ‘negative’ featuresFather Chrysostomos2011-12-241-11/+1
| | | | | | 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.
* feature.pm: Set bundle hints when dis/enabling featuresFather Chrysostomos2011-12-241-0/+12
| | | | | | | | | | 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.
* feature.pm: Add function for getting the current bundleFather Chrysostomos2011-12-241-0/+6
| | | | | | 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.
* Give feature.pm the bundle hintsFather Chrysostomos2011-12-241-0/+4
| | | | | It’s going to need them, in order to determine which list of features is currently enabled.
* Use only \w+ for internal feature namesFather Chrysostomos2011-12-241-1/+1
| | | | This will make it possible to create macros for each.
* feature.pl: Gen %feature_bundle from %UniqueBundlesFather Chrysostomos2011-12-241-5/+5
| | | | | | | | | | | | | | | | | %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.)
* Create regen/feature.plFather Chrysostomos2011-12-241-19/+19
| | | | | This script generates lib/feature.pm. Soon it will be made to gener- ate other files, too.
* Increase $feature::VERSION to 1.25Father Chrysostomos2011-12-241-1/+1
|
* Document the array_base featureFather Chrysostomos2011-12-151-9/+17
|
* Disable $[ under 5.16Father Chrysostomos2011-12-151-3/+15
| | | | | | | | | | | | | | | | | | | | | 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.
* feature.pm: Consistent use of spaces after full stopsFather Chrysostomos2011-12-151-8/+9
|
* Revise feature.pm documentationDavid Golden2011-12-151-75/+99
|
* Adjust docs to match new ver decl behaviourFather Chrysostomos2011-12-071-0/+4
|
* Document :default feature bundleFather Chrysostomos2011-12-071-3/+5
|
* Add :default feature bundleFather Chrysostomos2011-12-071-0/+1
|