summaryrefslogtreecommitdiff
path: root/pod/perlsyn.pod
Commit message (Collapse)AuthorAgeFilesLines
* perlsyn.pod: correct typo in docAndreas Koenig2019-02-111-1/+1
|
* perlsyn: Be more explicit about what is fasterEugen Konkov2018-08-251-1/+1
| | | | | | This paragraph can lead to ambiguity because it uses at example `for` keyword but then says: Perl executes a foreach statement more rapidly than it would the equivalent **for** loop.
* Spelling corrections in pod/*.pod from Alexandr Savca.Alexandr Savca2018-04-191-1/+1
| | | | | | | | | Alexandr Savca is now a Perl AUTHOR. For: RT #133120 Committer: holding off on the corrections to pod/perlartistic.pod until clarification of change to license text.
* revert smartmatch to 5.27.6 behaviourZefram2017-12-291-115/+414
| | | | | | | | | | | | | The pumpking has determined that the CPAN breakage caused by changing smartmatch [perl #132594] is too great for the smartmatch changes to stay in for 5.28. This reverts most of the merge in commit da4e040f42421764ef069371d77c008e6b801f45. All core behaviour and documentation is reverted. The removal of use of smartmatch from a couple of tests (that aren't testing smartmatch) remains. Customisation of a couple of CPAN modules to make them portable across smartmatch types remains. A small bugfix in scope.c also remains.
* better document while condition magicZefram2017-12-231-8/+18
| | | | | | | | The operators affected by while-condition magic variously didn't mention the implicit "defined" part of the magic or didn't mention it at all. In perlsyn.pod there was a partial mention of the magic in the context of the "for" loop, but none for the "while" loop. Describe the magic more fully on both ends. [perl #132644]
* merge branch zefram/dumb_matchZefram2017-12-171-414/+115
|\
| * add "whereis"Zefram2017-12-061-22/+35
| | | | | | | | | | "whereis" is like "whereso" except that it performs an implicit smartmatch.
| * change "when" keyword to "whereso"Zefram2017-12-051-28/+28
| |
| * make "when" do implicit "next"Zefram2017-11-291-12/+7
| | | | | | | | | | | | | | | | A "when" construct, upon reaching the end of its conditionally-executed block, used to perform an implicit jump to the end of the enclosing topicalizer, defined as either a "given" block or a "foreach" operating on $_. Change it to jump to the enclosing loop of any kind (which now includes "given" blocks).
| * remove useless "break" mechanismZefram2017-11-291-10/+3
| |
| * make loop control apply to "given"Zefram2017-11-291-2/+7
| | | | | | | | A "given" construct is now officially a one-iteration loop.
| * remove useless "default" mechanismZefram2017-11-281-15/+10
| |
| * revise all given/when documentationZefram2017-11-211-119/+70
| | | | | | | | | | | | Update documentation that describes old behaviour of given/when (of various vintages) as current. Remove duplication. Edit the main section in perlsyn for clarity. Properly document details of "break".
| * merge switch sections in perlsyn.podZefram2017-11-211-95/+90
| | | | | | | | | | | | Now that the biggest parts of the "Experimental Details on given and when" are gone, merge the remaining part of the section into the "Switch Statements" section.
| * regularise "when"Zefram2017-11-211-263/+12
| | | | | | | | | | | | | | | | | | | | | | Remove from "when" the implicit enreferencement of array/hash conditions and the implicit smartmatch of most conditions. Delete most of the documentation about behaviour of older versions of given/when, because explaining the now-old "when" behaviour would be excessively cumbersome and there's little compatibility to take advantage of. Delete the documentation about differences of given/when from the Perl 6 feature, because the differences are now even more extensive and it's too much difference to sensibly explain. Add tests of "when" in isolation.
| * regularise "given"Zefram2017-11-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Change "given" from implicitly enreferencing array and hash topics to just giving the topic scalar context. It's difficult to say whether this is a change of the intended behaviour or merely a bugfix, because the implicit enreferencement was not documented, and there were no tests exercising it. The documentation merely said that the argument is in scalar context, which correctly describes the new behaviour. Add a documentation note about the old behaviour, alongside the existing notes about historical given/when behaviour. Incidentally fix doc that referred to assiging to $_, to instead refer to aliasing. Add tests for "given".
* | document hash/block disambig in perlsynZefram2017-12-051-2/+10
|/ | | | Fixes [perl #130958].
* mv "Truth and Falsehood" from perlsyn to perldataZefram2017-11-141-11/+1
| | | | | This one-paragraph section didn't belong in perlsyn. perldata already had a paragraph on the topic; merge them. [perl #115650]
* parse yada-yada only as a statementZefram2017-11-101-21/+12
| | | | | | | | | | | | | | Commit f5727a1c71878a34f6255eb1a506c0b21af7d36f tried to make yada-yada be parsed consistently as a term expression, but actually things are more complicated than that. The tokeniser didn't accept yada-yada in the right contexts to make it usable as an expression, and changing that would require decisions on resolving ambiguities between yada-yada and flip-flop. It's also documented as being a statement rather than an expression, though with some incorrect information about ambiguities. Overall it looks more like the intent was for yada-yada to be a statement. This commit makes it grammatically treated as such, and also fixes up the dubious parts of the documentation. [perl #132150]
* Clarify use of 'continue' keyword after 'given'.James E Keenan2016-12-231-3/+3
| | | | For: RT #130324
* perlsyn: remove deprecated L<"section"> syntaxLukas Mai2016-06-111-3/+3
| | | | ... and fix a typo.
* perlsyn: change = to == in conditional in do/while exampleLukas Mai2016-01-061-7/+19
| | | | | | ... also remove unused LOOP label from 'last' example, mention 'redo' (works like 'next' in this case), add example that combines 'next'/'last' (and requires the label).
* remove documentation for the now-removed lexical topicRicardo Signes2015-10-021-7/+2
|
* Convert tabs to spaces and remove trailing space.Shlomi Fish2014-12-071-126/+126
| | | | For: RT #123377
* Rename lvalue referencesFather Chrysostomos2014-10-171-3/+3
| | | | | Also correct the description of lvref magic. When it was first added, it was for list assignments only, but that soon changed.
* Document lvalue referencesFather Chrysostomos2014-10-111-1/+16
|
* perlsyn: Remove reference to potential Unicode opKarl Williamson2014-09-181-3/+1
| | | | | See thread beginning at http://nntp.perl.org/group/perl.perl5.porters/219796
* Semicolon before ellipsis inside block disambiguates.James E Keenan2014-09-131-6/+5
| | | | | | | | | | | | 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
* Document empty conditional in for/whilePeter Martini2014-06-241-0/+15
| | | | | | | 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.
* move given/when ~~ note below item introducing itDoug Bell2014-05-291-4/+3
| | | | | | 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.
* fix POD errors reported by newer pod2manDominic Hargreaves2013-10-061-10/+10
|
* Small corrections in perlsyn, less one identified by tomc++.SHIRAKATA Kentaro2013-06-161-2/+2
| | | | For: RT #118495
* note that the return value of for is unspecifiedRicardo Signes2013-06-091-0/+6
| | | | [perl #118121]
* perlsyn.pod: NitShirakata Kentaro2013-03-121-1/+1
|
* Mention in more places that my $_ is deprecatedFather Chrysostomos2012-12-041-1/+3
|
* Update perlsyn for given aliasing $_Father Chrysostomos2012-08-011-16/+18
| | | | plus one typo fix
* fix some typos in perlsyn.podRicardo Signes2012-04-241-2/+2
| | | | (both reported by Tom Christiansen)
* perlsyn: spaces after dotsFather Chrysostomos2012-01-051-18/+22
|
* perlsyn: wrap long verbatim lineFather Chrysostomos2012-01-051-1/+2
|
* perlsyn: Correct ... exampleFather Chrysostomos2012-01-051-2/+2
|
* perlsyn: add triple-dot index entries and aliasFather Chrysostomos2012-01-051-1/+6
| | | | | | 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.
* Correct links to perlsyn and perlopFather Chrysostomos2012-01-051-1/+1
|
* [perl #90926] Corrections to the previous patchTom Christiansen2012-01-051-2/+2
| | | | | Here is a patch against the second patch, fixing typos reported to me.
* [perl #90926] smartmatch PATCH 2 of 2: perlsyn.podTom Christiansen2012-01-051-389/+565
| | | | | | As previously explained, this patch against perlsyn is part and parcel of the previous one against perlop (two commits ago; perl #90906).
* pod/perlsyn: for is equivalent to "foreach'Ævar Arnfjörð Bjarmason2011-11-301-0/+3
| | | | | | | 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.
* [RT #36079] Convert ` to '.jkeenan2011-11-221-1/+1
|
* Document BEGIN, END, etc. in perlsynDavid Golden2011-09-291-0/+5
| | | | | | 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.
* fix smart match docs for lhs undefJesse Luehrs2011-07-071-1/+1
| | | | | undef ~~ 0 is false, but undef == 0 is true - this one is falling under the undef ~~ Any case, not the Any ~~ Num case.
* Doc update for changes in 5.15.0 + tweaksFather Chrysostomos2011-06-171-1/+3
|
* perlsyn: fix broken link to thisKarl Williamson2011-05-181-0/+1
| | | | | The X<> have spaces between them which was causing the =head to generate a different anchor than expected