Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Perl6 Pod -- reinventing the wheel? (=para)

by tye (Cardinal)
on Nov 26, 2006 at 01:49 UTC ( #586066=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl6 Pod -- reinventing the wheel?
in thread Perl6 Pod -- reinventing the wheel?

Given your example and some of what you wrote (including criticism of "=cut"), I got the impression that the Perl-5-style "obvious" way to write paragraphs and verbatim text blocks had been dropped. I think that it is one of the best features of (Perl 5) POD, that you can denote a paragraph by simply adding a blank line and denote sample code by simply indenting a paragraph (both so intuitive, compact, clear, and convenient that they were obvious to both the author and the reader).

Checking the linked Synopsis, I see that this isn't the case. The obvious method is still supported. The example in the (well, that is the) Synopsis looks much more like Perl 5 POD and looks better, IMO, than the example you gave above. Just for y'all's information (including other readers who might have gotten a similar impression but didn't want to bother to browse the Synopsis).

Thanks for the Synopsis and for the explanation here, Damian.

- tye        


Comment on Re^2: Perl6 Pod -- reinventing the wheel? (=para)
Re^3: Perl6 Pod -- reinventing the wheel? (=para)
by TheDamian (Priest) on Nov 26, 2006 at 03:53 UTC
    To expand on Tye's comment, you could of course still write in a more traditional Perl documentation style:
    #!/usr/bin/perl use strict; use warnings; =begin pod =head1 A few good subs This is a line of Pod. This module contains some functions and might be used as follows: do_something(); # Magic happens here! =end pod # ------------------ # Subroutines # ------------------ =begin pod =head2 do_something You'd use this I<awesome> function for: =item When you want to do foo. =item When you want to do bar, since foo obviously isn't cutting it. =end pod sub do_something { print "Magic goes here.\n"; } print "hi.\n"; do_something; print "bye!\n";
    ...if you preferred.

    I'd argue that this version is also much cleaner and less intrusive than Texinfo or HTML (or even classic POD). Whether it's better than the version I showed earlier is, I suspect, a matter of personal preference. Some people will prefer the clarity of explicit tags, others will prefer the elegance of implicit contextual cues.

    The point being, of course, that Pod is part of Perl 6, and hence TMTOWTDI.

    Damian

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://586066]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-07-26 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls