Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Automating help doc index as new modules are installed

by Mr_Micawber (Beadle)
on Nov 25, 2007 at 17:58 UTC ( [id://652847]=perlquestion: print w/replies, xml ) Need Help??

Mr_Micawber has asked for the wisdom of the Perl Monks concerning the following question:

The mobo on my WinXP box went bad, and -- at least for now -- I'm not going back to Gates & Co. for more bloatware. My backup computer is an old 400mhz HP, and I've set it up with Ubuntu 7.1, compiling Perl5.8.8 as part of my LAMP stack. It's a very "standard" install structure AFAIK.

On WinXP, I depended on a package manager built into a local Perl homepage app (I think it was IndigoPerl). I found it very convenient that the documentation for newly installed packages showed up there in a nifty list.

Now when I install new modules, I use Ubuntu package repositories when it's easy, and CPAN when I want the latest version or can't find what I want via apt-get. I also install by compiling when the above don't work

I'm like a kid in a candy store. I want to try some modules just for fun, some from curiosity, and some because I just think I "should". Now I have so many modules installed kinda willy-nilly that I would like to have a local index.html that I could auto-update with links to (html representations) of all my current pod/man pages.

Does this already exist and I just don't know where to look or is there a script or tool for this job?

  • Comment on Automating help doc index as new modules are installed

Replies are listed 'Best First'.
Re: Automating help doc index as new modules are installed
by perrin (Chancellor) on Nov 25, 2007 at 18:37 UTC

      Ahh, the power of Perl!

      That works, and it took me longer to read the short documentation than it did to install it! Thanks much, it is exactly what I was looking for.

Re: Automating help doc index as new modules are installed
by eserte (Deacon) on Nov 25, 2007 at 19:01 UTC
    You could use tkpod (part of Tk::Pod) which has a tree view of all installed modules.
Re: Automating help doc index as new modules are installed
by Thelonius (Priest) on Nov 25, 2007 at 18:46 UTC
    The ActivePerl distributions do this automatically. Or, at least, the ones on HP-UX and Windows do. I assume the others do, as well.
Re: Automating help doc index as new modules are installed
by codeacrobat (Chaplain) on Nov 26, 2007 at 07:39 UTC
    Indexing the modules on the startup of Pod::Webserver can take a long time. I found myself too often busy waiting for the "You can now open your browser" message. So why not let a script automatically startup firefox after indexing is done.
    use POSIX 'setsid'; use IO::Handle; # autoflush sub daemonize { chdir "/" or die "Cant chdir to /: $!"; open STDIN, "/dev/null" or die "Cant read /dev/null: $!"; open STDOUT, ">/dev/null" or die "Cant write to /dev/null: $!"; defined(my $pid = fork) or die "Cant fork: $!"; exit if $pid; setsid or die "Cant start a new session: $!"; open STDERR, ">&STDOUT" or die "Cant dup stdout: $!"; } daemonize(); open my $pws, q(podwebserver |) or die $!; autoflush $pws; while (<$pws>) { /You can now open your browser to/ and last; } system q(firefox -remote "openurl( http://localhost:8020/, new-tab)");

    print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://652847]
Approved by FunkyMonk
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-25 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found