| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Co-authored-by: Tony Cook <tony@develop-help.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new infix operator named `isa`, with the semantics that
$x isa SomeClass
is true if and only if `$x` is a blessed object reference that is either
`SomeClass` directly, or includes the class somewhere in its @ISA
hierarchy. It is false without warning or error for non-references or
non-blessed references.
This operator respects `->isa` method overloading, and is intended to
replace boilerplate code such as
use Scalar::Util 'blessed';
blessed($x) and $x->isa("SomeClass")
|
|
|
|
| |
This removes $^{FEATURE_BITS}, since it's no longer needed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Perform only a bit check instead of a much more expensive hash
lookup to test features.
For now I've just added a U32 to the cop structure to store the bits,
if we need more we could either add more bits directly, or make it a
pointer.
We don't have the immediate need for a pointer that warning do since
we don't dynamically add new features during compilation/runtime.
The changes to %^H are retained so that caller() can be used from perl
code to check the features enabled at a given caller's scope.
|
|
|
|
|
|
|
|
| |
Per LGTM analysis: https://lgtm.com/projects/g/Perl/perl5/alerts/?mode=tree&ruleFocus=2163210746
and LGTM recommendation: https://lgtm.com/rules/2163210746/
For: RT 133699
|
|
|
|
| |
This removes arybase and all its surrounding machinery.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The feature still exists, for compatibility with code that tries to enable
it, but it has no effect. The postderef_qq feature still exists, however.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As proposed by RJBS.
The "5.24" feature bundle (and therefore C<< use v5.24 >>) now enable
postderef and postderef_qq.
I can't find any precedent for what to do with the relevant experimental::*
warnings category when an experimental feature graduates to acceptance. I
have elected to leave the category in place, so that code doing C<< no
warnings "experimental::postderef" >> will continue to work. This means that
C<< use warnings "experimental::postderef" >> is also accepted, but has no
effect.
|
| |
|
|
|
|
|
| |
Also correct the description of lvref magic. When it was first added,
it was for list assignments only, but that soon changed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
It doesn't do anything yet.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise CURRENT_FEATURE_BUNDLE will end up including any hints added
later that happen to use higher bits.
This was causing autobox to turn off all features, causing failures
for Dist::Zilla::PluginBundle::AVAR.
I’m not adding tests for this, as such tests would need constant
tweaking in future perl developement. What autobox is doing is
naughty and unsupported anyway.
|
| |
|
|
|
|
|
| |
unicode_strings was not the longest string. We can determine it auto-
matically, now that this macro is in a generated file.
|
| |
|
| |
|
|
|
|
|
| |
It makes little sense to have it in perl.h any more. (Until
recently, feature.h didn’t exist.)
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
unsigned >= 0 produces a warning, even if the 0 is actually a macro.
|
| |
|
|
|
|
|
|
|
|
|
| |
CURRENT_HINTS is not specific to features, but for now will be used by
nothing else. It returns the compile-time or run-time hints, depend-
ing on whether PL_curcop points to &PL_compiling.
CURRENT_FEATURE_BUNDLE extracts the feature bundle number from the
current hints.
|
| |
|
|
|