in reply to Psuedo-PerlMonk Style Links

Also see Text::WikiFormat.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: Psuedo-PerlMonk Style Links
by halley (Prior) on May 14, 2003 at 19:22 UTC

    Personally, I'd love to see the POD parsers handle some Wiki formatting idioms like the bullet lists.

    Any line following a blank line and starting with an asterisk should be seen as an implied =item * instead, using an =over 4 if the preceding paragraph wasn't also a bulleted item.

    Any line following such a bullet item and starting with an asterisk should also be seen as an implied =item.

    If there is leading whitespace, and the previous line is a bullet item, then inject another =over 4.

    To avoid conflict between indented code areas and numbered lists, nested lists have to follow their parents without a blank line. First-column lists can have blank lines above them. Unlike Wiki, you wouldn't need to terminate a list: just start something with less indent or with no asterisk.

    An indented line without bullet but immediately following a bulleted line would be seen as a new flowing paragraph at the same indent level, not as the start of a preformatted indented code block.

    Same goes for the # for numbered lists; since it's in POD, there's no overlap with Perl comments.

    Roughly:

    =head1 METHODS * new() # This is a code block with a Perl comment since # it's indented and follows a blank line. my $foo = new MyClass(parameters); Creates a new instance of MyClass. Valid parameters: # --style Sets the initial style parameter. Valid styles: * dotted * dashed * stippled # --text Sets the initial text parameter. =cut

    A lot briefer and more readable than the =over4/=item*/=item2 equivalent, I think. And since it can still be expressed AS the above items, maybe it can just be done as a preprocessor step.

    --
    [ e d @ h a l l e y . c c ]