Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[S06] fossil, my/our anonymous subs were superseded by 'anon' some ti…

…me ago

git-svn-id: http://svn.pugscode.org/pugs@30554 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 4b32e07a5fadc32106ea9d3117c6eb202de9ffb4 1 parent 3ac952b
lwall authored
Showing with 3 additions and 8 deletions.
  1. +3 −8 S06-routines.pod
View
11 S06-routines.pod
@@ -114,14 +114,9 @@ The general syntax for anonymous subroutines is:
sub ( PARAMS ) TRAITS {...}
-But one can also use a scope modifier to introduce the return type first:
+But one can also use the C<anon> scope modifier to introduce the return type first:
- my RETTYPE sub ( PARAMS ) TRAITS {...}
- our RETTYPE sub ( PARAMS ) TRAITS {...}
-
-In this case there is no effective difference, since the distinction between
-C<my> and C<our> is only in the handling of the name, and in the case of
-an anonymous sub, there's isn't one.
+ anon RETTYPE sub ( PARAMS ) TRAITS {...}
B<Trait> is the name for a compile-time (C<is>) property.
See L<"Properties and traits">.
@@ -826,7 +821,7 @@ C<multi>s with C<proto>s) translate named arguments to positional in the
first N positions. Also, purely positional calls may obviously omit any
named lookups, as may bindings that have already used up all the named
arguments. The compiler is also free to intuit proto signatures for
-a given sub or method name as long as the candidate list is stable..
+a given sub or method name as long as the candidate list is stable.
=head2 List parameters
Please sign in to comment.
Something went wrong with that request. Please try again.