Browse files

clarification of multi-bracket format

  • Loading branch information...
1 parent 651b8f1 commit 59b13951596010d0e104d040e92785de6e21f226 @rjbs committed Apr 17, 2010
Showing with 20 additions and 2 deletions.
  1. +8 −2 pod/perlpod.pod
  2. +12 −0 pod/perlpodspec.pod
10 pod/perlpod.pod
@@ -558,8 +558,8 @@ This will produce: "C<$a E<lt>=E<gt> $b>"
A more readable, and perhaps more "plain" way is to use an alternate
set of delimiters that doesn't require a single ">" to be escaped. With
-the Pod formatters that are standard starting with perl5.5.660, doubled
-angle brackets ("<<" and ">>") may be used I<if and only if there is
+the Pod formatters that are standard starting with perl5.5.660 (circa 2000),
+doubled angle brackets ("<<" and ">>") may be used I<if and only if there is
whitespace right after the opening delimiter and whitespace right
before the closing delimiter!> For example, the following will
do the trick:
@@ -582,6 +582,12 @@ And they all mean exactly the same as this:
C<$a E<lt>=E<gt> $b>
+The multiple-bracket form does not affect the interpretation of the contents of
+the formatting code, only how it must end. That means that the examples above
+are also exactly the same as this:
+ C<< $a E<lt>=E<gt> $b >>
As a further example, this means that if you wanted to put these bits of
code in C<C> (code) style:
12 pod/perlpodspec.pod
@@ -429,6 +429,18 @@ themselves. That is, these are all synonymous:
and so on.
+Finally, the multiple-angle-bracket form does I<not> alter the interpretation
+of nested formatting codes, meaning that the following four example lines are
+identical in meaning:
+ B<example: C<$a E<lt>=E<gt> $b>>
+ B<example: C<< $a <=> $b >>>
+ B<example: C<< $a E<lt>=E<gt> $b >>>
+ B<<< example: C<< $a E<lt>=E<gt> $b >> >>>
In parsing Pod, a notably tricky part is the correct parsing of

0 comments on commit 59b1395

Please sign in to comment.