Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found