Skip to content

Commit fcaf02c

Browse files
committed
make uses parcel semantics
1 parent d528d11 commit fcaf02c

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

S05-regex.pod

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Synopsis 5: Regexes and Rules
1717

1818
Created: 24 Jun 2002
1919

20-
Last Modified: 27 Jan 2014
21-
Version: 172
20+
Last Modified: 31 Jan 2014
21+
Version: 173
2222

2323
This document summarizes Apocalypse 5, which is about the new regex
2424
syntax. We now try to call them I<regex> rather than "regular
@@ -2983,6 +2983,25 @@ may be of any type.
29832983
This makes it convenient to build up an abstract syntax tree of
29842984
arbitrary node types.
29852985

2986+
The C<make> function does not impose any item or list context onto its argument,
2987+
so if you say something ambiguously listy like
2988+
2989+
make ()
2990+
make @array
2991+
make foo()
2992+
2993+
the value returned from C<.ast> will interpolate into a list. To suppress this, use
2994+
one of these:
2995+
2996+
make ().item
2997+
make []
2998+
make $@array
2999+
make [@array]
3000+
make foo().item
3001+
make $(foo())
3002+
3003+
or use C<.ast.item> or a C<$> variable on the receiving end.
3004+
29863005
=item *
29873006

29883007
You may also capture a subset of the match using the C<< <(...)> >> construct:

0 commit comments

Comments
 (0)