X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlsub.pod;h=71d6691e38dcbca4b827be1af6b8d09760d2a14c;hb=a8ca0236e96a844dc900676193c8ac52013c5a03;hp=9711ca6c0da737b8c854651dde592d40faa24f01;hpb=dbb128be9d98f2152d3ce957d4c3c518a9f86260;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 9711ca6..71d6691 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -83,9 +83,9 @@ aggregates (arrays and hashes), these will be flattened together into one large indistinguishable list. If no C is found and if the last statement is an expression, its -value is returned. Otherwise, if the last statement is a control structure -like a C, the returned value is unspecified. The empty sub -returns the empty list. +value is returned. If the last statement is a loop control structure +like a C or a C, the returned value is unspecified. The +empty sub returns the empty list. X X X Perl does not have named formal parameters. In practice all you @@ -1400,17 +1400,17 @@ nest properly. Examples of valid syntax (even though the attributes are unknown): - sub fnord (&\%) : switch(10,foo(7,3)) : expensive ; - sub plugh () : Ugly('\(") :Bad ; + sub fnord (&\%) : switch(10,foo(7,3)) : expensive; + sub plugh () : Ugly('\(") :Bad; sub xyzzy : _5x5 { ... } Examples of invalid syntax: - sub fnord : switch(10,foo() ; # ()-string not balanced - sub snoid : Ugly('(') ; # ()-string not balanced - sub xyzzy : 5x5 ; # "5x5" not a valid identifier - sub plugh : Y2::north ; # "Y2::north" not a simple identifier - sub snurt : foo + bar ; # "+" not a colon or space + sub fnord : switch(10,foo(); # ()-string not balanced + sub snoid : Ugly('('); # ()-string not balanced + sub xyzzy : 5x5; # "5x5" not a valid identifier + sub plugh : Y2::north; # "Y2::north" not a simple identifier + sub snurt : foo + bar; # "+" not a colon or space The attribute list is passed as a list of constant strings to the code which associates them with the subroutine. In particular, the second example