Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Each line begins with a token denoting what it describes ... The token is followed by \s+. If an item is split onto multiple lines, it is understood to continue until a new token or block break is reached.

    Maybe I missed something, but what do you do if the word 'a' is the first letter of an item split onto multiple lines? How does the parser know that's not a token?

    • Ooh, good catch. As it stands, it wouldn't. The workaround is not to split a line before an "a" :-)

      If anyone can think of a patch to the spec to fix that without adding complexity (I can't off the top of my head) I'd be interested to hear it.
      • As a format which could conceivably be written in other (human) languages, can you guarantee that none of them will have the same issue? Or that someone might refer to their 'd' subroutine and mess things up?

        Maybe subsequent lines could be indented or the preceding line could end in a backslash?

        • by hex (3272) on 2007.11.09 12:41 (#58962) Homepage Journal

          confound on IRC suggested starting continued lines with a '.', but that's more chrome to impede a quick visual scan of the document, as are backslashes. On the other hand, the backslash is a well-known line continuation indicator. I prefer though your suggestion of indenting. Leading whitespace already seems to be commonly used on CPAN to indicate a continued comment.

          a We added a new shiny feature that you'll all love:
            a magic automatic doodad configurator.
          b! A major bug got fixed. Really major. It was so awful,
            in fact, that I can only talk about it in Latin:
            Lorem ipsum dolor sit amet, consectetuer adipiscing
            elit. Nulla iaculis mi quis mi. Quisque nibh neque,
            gravida quis, bibendum vitae, aliquet ut, enim.