On 4/28/2012 4:49 AM, Sisyphus wrote:
----- Original Message ----- From: "Maggie X" <[email protected]>
To: "chm" <[email protected]>
Cc: "perldl" <[email protected]>
Sent: Thursday, April 26, 2012 11:03 AM
Subject: Re: [Perldl] PDL-Stats new release
I didn't have to call scantree.pl. I wrote a little script using
functions
documented in PDL::Doc. It loads the existing pdldoc.db, scans and adds
PDL::Stats functions to it.
For the Windows ppm packages, there's no blib to scan. Well .... there
*is* a blib, but it's in some temporary directory, and I don't know what
might be involved in locating it.
Instead, I'd rather that the updating of pdldoc.db was done *without*
attempting to scan the blib.
That seems reasonable.
So ... I'm thinking I'll just use a modified version of Maggie's
add_doc.pl, run as a post ppm install script.
I think the following approach should work. (For some context, see
add_doc.pl in the PDL::Stats source.)
$dir = <full path to top level PDL folder>;
$pdldoc->ensuredb();
$pdldoc->scan("$dir/Stats.pm");
$pdldoc->scantree("$dir/Stats");
eval { $pdldoc->savedb(); };
warn $@ if $@;
That assumes that you can do a 'scan' followed by a 'scantree' without
anything getting clobbered.
Should I expect any problems with that ?
I don't know. The PDL docs handling code hasn't
seen many changes to to underlying data structure
and it is enough monolithic-looking that it could
be fragile if things change too much.
It would be nice if the implementation could be
made more modular (e.g., you could compose the
docs from multiple database files somehow, undo
changes,...).
I'll give this a trial run on one of my own perls .... what's the quick
and simple check to see that it has worked ok ?
'pdldoc XXX' where XXX is something in the new module's
documentation. You could also start up perldl or pdl2
and use help or apropos there.
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl