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

I'm using ActiveState Perl 5.22.3 currently and have that installed system wide, while I want to install additional packages using PPM per user only. This works after setting PERL5LIB e.g. to the path C:/Users/.../AppData/Roaming/Perl/x64/Current/lib and selecting that directory in the GUI of PPM as the target for installations. What doesn't seem to work is generation of HTML documentation from the installed packages.

The system wide installation folder of Perl contains a html directory with lots of docs with what got installed by default and using Process Monitor I can see that PPM tries to delete the file perltoc.html from that folder. After giving my user permissions to change contents of that directory, that file is recreated, but it doesn't contain any hints to newly installed packages of PPM. Without changing permissions, PPM logs the following error:

2020-02-03T18:57:54 <4> [ppm.bat:26] Can't open 'C:\Program Files\Perl\Current\html/perltoc.html': Permission denied at C:/Program Files/Perl/Current/lib/ActivePerl/DocTools.pm line 36.

That's why I thought that PPM might simply stop too early and doesn't provide HTML successfully. But things doesn't seem to be so easy and there's another HTML-folder in my user profile containing directories for all installed packages already:

C:\Users\[...]\AppData\Roaming\Perl\x64\5.22.3\html\site\lib

The problem is that this thing doesn't contain any files. Looking at Process Monitor, I'm not even sure if PPM generates HTML files at all, even though my packages contain POD-files: PPM is working in temporary directories for each package to install and those contain html-folders and PPM iterates the contents of those, but they seem to be empty. Process Monitor doesn't log any found files and PPM doesn't attempt to copy any individual file at all, even though it logs a copy process:

[InstallArea.pm:362] Installing AAAAAAAAA with id 91 [InstallArea.pm:369] Copy C:\Users\[...]\AppData\Local\Temp\ppm-eYtrkD +/AAAAAAAAA-1.01/blib/html --> C:/Users/[...]/AppData/Roaming/Perl/x64 +/Current/html [InstallArea.pm:369] Copy C:\Users\[...]\AppData\Local\Temp\ppm-eYtrkD +/AAAAAAAAA-1.01/blib/lib --> C:/Users/[...]/AppData/Roaming/Perl/x64/ +Current/lib.

So, how should PPM work regarding HTML-docs at all? How does it decide when to generate that, where does it generate that and where does it put it? I couldn't find much docs about how things should work by default.

Thanks!

Replies are listed 'Best First'.
Re: How does ActiveState's PPM generate HTML and where does it store it?
by syphilis (Archbishop) on Feb 03, 2020 at 21:58 UTC
    Can't open 'C:\Program Files\Perl\Current\html/perltoc.html': Permission denied at C:/Program Files/Perl/Current/lib/ActivePerl/DocTools.pm line 36.

    Note that this is a permissions issue. The file 'C:\Program Files\Perl\Current\html/perltoc.html' apparently exists.

    The latest ActiveState perl that I have is version 5.16.0.
    It (and the few other earlier ActiveState perls that I have) install the html docs into perl/html. (That's the location of perltoc.html, for example.)
    Modules whose '.pm' files are located in perl/lib will have they're html doc files located in perl/html/lib, while those modules whose '.pm' files are located in perl/site/lib will have their html doc files located in perl/html/site/lib.

    Some examples:
    The html documentation for perl/lib/Benchmark.pm is in perl/html/lib/Benchmark.html
    The html documentation for perl/lib/Algorithm/Diff.pm is in perl/html/lib/Algorithm/Diff.html
    The html documentation for perl/site/lib/List/MoreUtils.pm is in perl/html/site/lib/List/MoreUtils.html

    I expect that the html is being generated by perl/bin/pod2html.bat (or C:\Program Files\Perl\Current\bin\pod2html.bat in your case), but I don't know precisely how it's being done or how to influence the location into which those html files are being placed by ppm.

    Update: check the documentation of the various modules in C:\Program Files\Perl\Current\lib\ActivePerl\PPM.

    Cheers,
    Rob