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

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

This is an example of using CPAN to distribute a script. The guts are in Pod::Webserver, and a script, podwebserver is supplied to call it.

I came across this module in the first chapter of Perl hacks as Hack #3: "Browse Perl Docs Online". My first thoughts were: "Big deal. There's http://search.cpan.org and ubiquitous internet access."

But, the differences is that CPAN gives you all modules known to person and beast kind, and the latest versions thereof. Podwebserver gives you your modules - just the ones you have installed, and the versions you have installed. It also doesn't care how they got there: make install, PPM install, apt-get install, rsync from installation master or whatever. It will also include your own custom written and installed modules, ones that will never go anywhere near CPAN, provided they contain POD.

Install the module Pod::Webserver, and run the script podwebserver in the background. You will then (after some initialisation) be able to point a browser at port 8020 on the node running podwebserver. You can use a different port number if you specify it from the command line.

This will faithfully reflect @INC, including paths added via $ENV{PERL5LIB}. This is very useful for me in my present work location, as I have a custom hand-picked subset of CPAN (under version control, in a special place pointed to by PERL5LIB) that I make available to other developers.

I've come across (and reported) a bug that there is an undocumented timeout after 5 hours of inactivity. If this is a problem, it's simple to take care of, by wrapping the script in a shell loop.


In reply to Pod::Webserver by rinceWind

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (12)
    As of 2014-07-28 11:01 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (196 votes), past polls