@@ -140,6 +140,11 @@ evaluates that script ("eval time") to produce the output. All Perl code is
140
140
run when the script is evaluated, except for commands notes as occuring at
141
141
generation time.
142
142
143
+ For double-quotes adjacent to the delimiters, add whitespace between
144
+ the quote and the delimiter. For example, use C<< <? " >> and C<< " ?> >>
145
+ instead of C<< <?" >> and C<< "?> >>. The exception is if you want to invoke
146
+ L<capturing|"Capturing"> , described below.
147
+
143
148
=head2 Modes
144
149
145
150
=over
@@ -214,8 +219,21 @@ C<< <?:elsif NAME CONDITION ?> >> (or C<elif> or C<elseif>).
214
219
215
220
=head2 Capturing
216
221
217
- Description coming soon! In short, C<< <? print "?>some string<?" ; ?> >>.
218
- That way you don't have to express long blocks of text as Perl string literals.
222
+ Capturing permits you to express single-quoted strings without having to
223
+ quote and escape. For example, C<< <? print "?>some $text "string"<?" ; ?> >>
224
+ outputs C<some $text "string" > literally, without substituting C<$text > and
225
+ without the need to escape the double-quotes. That way you don't have to
226
+ express long blocks of text as Perl string literals.
227
+
228
+ Capturing can be used anywhere a Perl string expression is valid.
229
+
230
+ PerlPP commands can be nested within captured strings. For example,
231
+ running the script
232
+
233
+ <?= "!" . "?>foo<?= 42 ?><?" . "bar" ?>
234
+
235
+ will output C<!foo42bar > . The C<42 > is generated by the nested
236
+ C<< <?= 42 ?> >> expression.
219
237
220
238
=head1 THE GENERATED SCRIPT
221
239
@@ -307,4 +325,4 @@ OTHER DEALINGS IN THE SOFTWARE.
307
325
308
326
=cut
309
327
310
- # vi: set ft=perl: #
328
+ # vi: set ft=perl ts=4 sts=0 sw=4 noet ai : #
0 commit comments