Ricardo Signes wrote:
* Allison Randal <[email protected]> [2010-03-16T08:01:49]
David E. Wheeler wrote:
My interpretation of that was that any angle brackets inside should be
considered literal, and thus escaped. The whole point of `<<   >>` AFAICS
was to allow one to use literal brackets without escaping them, as one must
do in `<>`.
That's my interpretation too. If you have to escape every angle
bracket inside doubled-up C<<>> tags, there's really no point in
even having the doubled-up tags.

No one is saying that you have to escape every angle bracket inside anything.

For example, these should all be fine:

  The ->, or dereference, operator...

  Call C<< $object->foo >>

  If x > 10

  All items where C<< $x > 10 >>

  In the event that C<< $x > L<Foo>->blort >>....

In the first four, there is no ambiguity.  We don't have something in the form
X<...> where X is [A-Z].  The only thing in question is the last one.  The
question is whether all characters until the matching \s>> are considered
literally or whether they're still Pod.

The bug report from CJM seems correct: formatting codes should work inside
C<<>>.  There is nothing about that change which would require escpaing -> or
other non-formatting-code uses of angle brackets.

Hmmmm... that does put a different light on it... But, I still think it's more useful and less confusing as an absolute escape on all angle brackets within the region. So either a) every angle is literal:

  C<< $x > L<Foo>->blort >>

or b) escape all non-special angles:

  C<$x E<gt> LE<lt>FooE<gt>-E<lt>blort>

The alternatives suggested:

  C<< $x > LZ<><Foo>->blort >>
  C<< $x > LE<lt>FooE<gt>->blort >>

Have a design taste of hacks required by a formatting language that's too limited and inconsistent.

The bug reporter asked how to write:

  S<< C<< name => value >> >>

That's just:

  S< C<< name => value >> >

The non-interpolation rule doesn't apply until you get to the double-angles.

Allison

Reply via email to