in reply to Re: how about cool uses for perlDOC?
in thread how about cool uses for perlDOC?

While I recall that the perldoc verbiage (and verbiage elsewhere?) generally frowns on using pod to comment out sections of code, I still use it anyway. (I don't use pod to embed documentation in my code so the two uses don't conflict.)

It's just very easy to embed

=pod print "Hello World\n"; =cut

and hopping to the start or beginning of a block of commented-out code is as easy as searching for =pod or =cut. Vim colors the comment in blue so that it stands out quite nicely from live code. Inserting # symbols easily disables these marks when necessary.

Replies are listed 'Best First'.
Re^3: how about cool uses for perlDOC?
by ff (Hermit) on Feb 27, 2005 at 04:15 UTC
    Hmm, while browsing things about vim I came upon an excellent article about using vim with perl http://mamchenkov.net/blog/item/vim_for_perl_developers which mentioned a tool to add to your plugins folder (the BlockComment plug-in by Chris Russell). Basically, by highlighting a block of text with your mouse, you can comment that block while preserving its indentations by doing a .c and you can toggle off the comments by highlighting the text and doing .C