| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
For: RT #123377
|
|
|
|
|
| |
Also correct the description of lvref magic. When it was first added,
it was for list assignments only, but that soon changed.
|
| |
|
|
|
|
|
| |
See thread beginning at
http://nntp.perl.org/group/perl.perl5.porters/219796
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct documentation which indicated that, inside a block, a semicolon after
an ellipsis statement would disambiguate between a block and a hash reference
constructor. The semicolon must precede the ellipsis to perform this
disambiguation.
Add tests to demonstrate that whitespace around the ellipsis statement does
not impeded the disambiguation. Add perldelta entry.
For: RT #122661
|
|
|
|
|
|
|
| |
An empty conditional in both for and while has been treated
as true since perl 1.0. This has a clear analogue in C/C++
in the case of for(;;), but while() is not legal C and should
be documented.
|
|
|
|
|
|
| |
The note explaining to use $c ~~ $_ instead of $_ ~~ $c was put under the item
introducing all binary operators, and not the one mentioning the explicit
smartmatch operator.
|
| |
|
|
|
|
| |
For: RT #118495
|
|
|
|
| |
[perl #118121]
|
| |
|
| |
|
|
|
|
| |
plus one typo fix
|
|
|
|
| |
(both reported by Tom Christiansen)
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This adds the index entries to perlsyn that were removed in
the previous commit, and mentions in perlsyn that the ellipsis
is also called a triple-dot.
|
| |
|
|
|
|
|
| |
Here is a patch against the second patch,
fixing typos reported to me.
|
|
|
|
|
|
| |
As previously explained, this patch against perlsyn
is part and parcel of the previous one against perlop
(two commits ago; perl #90906).
|
|
|
|
|
|
|
| |
Change the Compound Statements section to not like by omission. Both
for and foreach can be used as C-style and Perl-style for-loops, but
the documentation pretended that "for" was always C-style and
"foreach" was always Perl-style.
|
| |
|
|
|
|
|
|
| |
This adds a brief note that blocks can be preceded by a
compilation phase keyword and points the reader to
perlmod for the gory details.
|
|
|
|
|
| |
undef ~~ 0 is false, but undef == 0 is true - this one is falling under
the undef ~~ Any case, not the Any ~~ Num case.
|
| |
|
|
|
|
|
| |
The X<> have spaces between them which was causing the =head to
generate a different anchor than expected
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I also fixed a bug in the original. I'm always getting C<eof> vs C<eof()>
swapped in my brain, which is what had happened here. The old code didn't
do what it said it did because it contrary to the comments didn't reset at
each eof -- because it used the C<eof()> form which is all of ARGV rather
than bare C<eof> for the last file read, and thus each per-file component
of ARGV.
I am concerned about the two paragraphs previous to that, because they
use eof() and I am not perfectly clear that they should. But I left
them as is.
Jesse asked for "a lot of eyes", so if folks could please look at this
patch and see whether it looks ok, I'd appreciate it. I did test it
under blead, both with and without the prefixed m on the m?? matches,
which is how I discovered it was buggy with the C<eof()> not C<eof>.
--tom
|
|
|
|
|
|
| |
The `z' in words like `optimize' appears to be already dominant
in this document; the few uses of the British `s' have been
replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had about an hour of über confusion regarding smart matching in a
when, and when I finally clocked on to what the POD was telling me I
thought clarification would be in order. Many agreed :)
The chief change I would make is to use the word 'operands' instead of
'arguments' when referring to the ... and ..., ... && ... etc
sections; this was the major cause of my confusion. Second
clarification is that 'the test' in question is whether to use smart
matching, not the result of using smart matching!
Patch follows; please go ahead and amend as required :)
|
|
|
|
|
|
|
| |
# New Ticket Created by (Peter J. Acklam)
# Please include the string: [perl #81906]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81906 >
|
|
|
|
|
|
| |
syntax for line directives, and the ones allowed by modern C preprocessors.
Reported by "kst@mib.org".
|
|
|
|
|
|
|
| |
\g was added to avoid ambiguities that \digit causes. This updates the
pod documentation to use \g in examples, and to prefer it when
explaining the concepts. Some non-symmetrical outlined text dealing
with it was also cleaned up.
|
|
|
|
| |
And tweak its documentation.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Note to the deprecation police: this is not a language construct
deprecation. Just a bit of healthy advice about coding style.
Who knows. In a decade, this may be the lynchpin of "postmodern perl".
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Date: Tue, 27 Oct 2009 01:29:40 +0000
From: Zefram <zefram@fysh.org>
To: perl5-porters@perl.org
Subject: bareword sub lookups
Attached is a patch that changes how the tokeniser looks up subroutines,
when they're referenced by a bareword, for prototype and const-sub
purposes. Formerly, it has looked up bareword subs directly in the
package, which is contrary to the way the generated op tree looks up
the sub, via an rv2cv op. The patch makes the tokeniser generate the
rv2cv op earlier, and dig around in that.
The motivation for this is to allow modules to hook the rv2cv op
creation, to affect the name->subroutine lookup process. Currently,
such hooking affects op execution as intended, but everything goes wrong
with a bareword ref where the tokeniser looks at some unrelated CV,
or a blank space, in the package. With the patch in place, an rv2cv
hook correctly affects the tokeniser and therefore the prototype-based
aspects of parsing.
The patch also changes ck_subr (which applies the argument context and
checking parts of prototype behaviour) to handle subs referenced by an
RV const op inside the rv2cv, where formerly it would only handle a gv
op inside the rv2cv. This is to support the most likely kind of modified
rv2cv op.
[This commit includes the Makefile.PL for XS-APITest-KeywordRPN missing
from the original patch, as well as updates to perldiag.pod and a
MANIFEST sort]
|
|
|
|
| |
(suggested by Aristotle Pagaltzis -- see [perl #69957])
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This makes ~~ commutative with regard to undef, and fixes an
inconsistency, since C<undef ~~ [0]> was not matching, and ~~
should be distributive in this case.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The reasons for that are :
- $_ ~~ 1..42 actually parses as ($_ ~~ 1) .. 42
- in when(), a range 1..42 will be expanded, and not treated as a
boolean flip-flop operator
- It will not distribute properly with array smart-matching, as
in $foo ~~ [1, 2, [4..5]] (that won't match for $foo = 4.2 for
example.)
|