summaryrefslogtreecommitdiff
path: root/pod/perlsyn.pod
Commit message (Collapse)AuthorAgeFilesLines
* 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
* "fix bug; also prefix ?? matches with m due to 5.14 deprecation"Tom Christiansen2011-05-081-6/+6
| | | | | | | | | | | | | | | | | | | | 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
* Docs: perlsyn.pod Use dominant American spelling consistently.Michael Witten2011-03-271-4/+4
| | | | | | The `z' in words like `optimize' appears to be already dominant in this document; the few uses of the British `s' have been replaced.
* Doc patch for perlsyn, clarification in given/whenAlastair Douglas2011-03-191-6/+48
| | | | | | | | | | | | | | 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 :)
* Fix typos in pod/*Peter J. Acklam) (via RT2011-01-071-1/+1
| | | | | | | # 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 >
* Fixes bug #79078, by pointing out the slight difference between Perl'sAbigail2010-11-141-3/+4
| | | | | | syntax for line directives, and the ones allowed by modern C preprocessors. Reported by "kst@mib.org".
* Prefer \g1 over \1 in podsKarl Williamson2010-06-281-1/+1
| | | | | | | \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.
* Add a note in perl5131delta about given return valuesVincent Pit2010-05-201-8/+11
| | | | And tweak its documentation.
* Merge branch 'vincent/rvalue_stmt_given' into bleadVincent Pit2010-05-191-0/+36
|\
| * Make given() statements return the last evaluated expressionVincent Pit2010-01-031-0/+36
| |
* | Document unless () {} elsif () {} else {} and tell people not to use it.Jesse Vincent2010-02-091-2/+6
| | | | | | | | | | | | 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".
* | "unless else" wasn't previously documented, though it was valid syntaxReini Urban2010-02-091-1/+4
|/
* Clarify docs for implicit "next" on all "when" blocksMoritz Lenz2009-11-201-1/+1
|
* Implement facility to plug in syntax triggered by keywordsJesse Vincent2009-11-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Better wording for the hash ~~ array docsRafael Garcia-Suarez2009-10-271-2/+2
| | | | (suggested by Aristotle Pagaltzis -- see [perl #69957])
* better document smart match overloadingDavid Mitchell2009-08-221-2/+12
|
* incremental improvement in ~~ documentation, already in maint-5.10Chip Salzenberg2009-08-201-9/+8
|
* Thinko in given() description, found by chromaticRafael Garcia-Suarez2009-07-241-1/+1
|
* Make C<undef ~~ 0> and C<undef ~~ ""> not match (like in 5.10.0)Rafael Garcia-Suarez2009-07-011-0/+1
| | | | | | 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.
* Minor doc fix for the smart table legend (clarify the "Object" entry).Rafael Garcia-Suarez2009-06-011-3/+2
|
* Remove now-obsolete note on ~~ overloading working only on the right.Rafael Garcia-Suarez2009-05-251-3/+1
|
* Allow ~~ overloading on the left side, when the right side is a plain scalarRafael Garcia-Suarez2009-05-241-0/+1
|
* Change the specs of %h~~%h to avoid mentioning ~~ recursivelyRafael Garcia-Suarez2009-05-241-1/+1
|
* Remove proposed (but unimplemented) $foo ~~ Range smart matching.Rafael Garcia-Suarez2009-05-121-11/+3
| | | | | | | | | | | 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.)