Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Inline POD vs. EOF POD

by pmas (Hermit)
on Jul 09, 2001 at 18:29 UTC ( #94988=note: print w/ replies, xml ) Need Help??


in reply to Inline POD vs. EOF POD

I like inline POD better, too.

If enough of us will use inline POD, it will become more standard, and editors will accomodate for it.

To improve readability, what about adding some lines before and after POD comments, like:

################## POD documentation begin ####### =pod B<fetch_paper()> Retrieves paper from environment and returns it. Should be wrapped in an C<eval{}> to catch errors. Returns: L<My::Paper> object. =cut ################## POD documentation end ####### sub fetch_paper { my ( $self ) = @_; ... }

Avoiding to 'commute' between sub code and doc comments is exactly the 'good' lazines we highly esteem, right?

Update:I also agree that sometimes the order of inline POD doc might be not the most beneficial, and sometimes info might belong to more than one module. I do not know yet how to solve this.

One of possible solution (for CGI applications) might be to use CGI::Application, which allows to wrap multiple programs as "run modes" into one module. Then, I can write sub in order as it makes sense in documentation.

As I said, I do not have solution, only weak preferences.

That is why I wnat to listen to insight from other monks, to see that other questions meight be asked, and what I forgot to consider.

What a great place is our monastery!

pmas

To make errors is human. But to make million errors per second, you need a computer.


Comment on Re: Inline POD vs. EOF POD
Download Code
Re: Re: Inline POD vs. EOF POD
by mugwumpjism (Hermit) on Aug 16, 2001 at 03:03 UTC

    Right on. I used to hate POD, and then I found a perl highlighting mode for emacs that highlights it properly. Now I hate that I haven't used it thus far, because it really reminds you to step back and examine your code as a critical observer.

    If I knew LISP, I'd try to extend emacs to do funky visual things when it sees POD, like make the background for the entire width of that visual line a different colour or something. But alas, I don't :-(

      I am using MultiEdit.

      Comments have one background color, inline POD has different background color. Easy to see what is POD text, what are comments, and what is code (white background). Of course syntax coloring for both HTML and Perl.
      Also I have templates expanded by space (i.e. after "if ", "wh ", or "sub ". Smart indent. Integrated FTP. Integrated compiler and compiler errors. Integrated C-like macro-language. And more...I am happy... ;-)

      pmas
      To make errors is human. But to make million errors per second, you need a computer.

        But... do you have VI command and editing keys, integration with the debugger (be it gdb or perl -d), integrated support for CVS, AND an integrated mail reader!?!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-12-21 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls