Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How To View POD Embedded in a Perl Script?

by LanX (Canon)
on Apr 04, 2014 at 01:09 UTC ( #1081049=note: print w/ replies, xml ) Need Help??


in reply to How To View POD Embedded in a Perl Script?

POD requires (per specification) empty lines around the delimiters. Some parsers don't care but it's usually better.

#!/usr/bin/perl print "Hello, World!\n"; =head1 NAME My::Module - An example module =cut

please note the newline after cut.

Using perldoc is ok

update

concerning IDEs: emacs in cperl-mode has the cperl-pod-to-manpage command, also available via menu as Perl / Perl docs / View manpage of POD in this file

Cheers Rolf

( addicted to the Perl Programming Language)


Comment on Re: How To View POD Embedded in a Perl Script?
Select or Download Code
Re^2: How To View POD Embedded in a Perl Script?
by ParsonGeorge (Initiate) on Apr 04, 2014 at 13:26 UTC

    Thanks for your help. For what it's worth, I actually did RTFM and knew that there was supposed to be a blank line following cut. I had a CR at the end of the cut line so the cursor jumped to a new line for input and I stupidly thought that was a blank line. It was not. I entered a CR on the line following cut in order to get a true blank line and the pod documentation is now working fine.

    I also found out that in Padre on Windows I could enter "perldoc pod.pl" as a Run -> Run Command (or Ctrl+F5) and the documentation displayed just fine. I'm still working making this work with Eclipse (I think that I have to define a new External Tool) and on my Linux box (I have to install the perl-doc package).

    However, I'm over that first hurdle. Thanks, again, for your help.

      IMHO running commands and piping STDOUT into a pane is a generic feature of every editor (or at least IDE).

      I'd be surprised if Padre or EPIC (i.e. Eclipse) do not already provide preset hotkeys. (maybe try F-keys in combination with Ctrl or Alt)

      Cheers Rolf

      ( addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2014-12-18 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (61 votes), past polls