You could use
Pod::Autopod to make your /tmp/tst. Autopod will print .pod if it finds .pm, etc. Just make tst.pl without the .pl. Then just do perldoc /tmp/tst. It should print without .pod. | [reply] [d/l] |
Great, that's pretty close to what I'm trying to "reinvent"! :)
| [reply] |
Why don’t you just call pod2text directly? That way you know exactly what it’s doing. | [reply] |
Sure I can do whatever I want. :)
The idea is that for end users file.pod has priority over file.pl or file.pm.
Like that file.pod can be flexibly generated out of (pseudo-)POD directives in file.pl
Motivation:
There is a long going discussion if POD should be inter-weaved with code or not, with good arguments for both sides.
For instance the order of subroutines/methods in the source isn't necessarily the best order for documentation.
And "private" subs shouldn't be documented at all.
Generating file.pod in a way reflecting these needs could be a handy solution, w/o forcing anybody to use anything else than classical perlpod.
| [reply] |
Generating file.pod in a way reflecting these needs could be a handy solution, w/o forcing anybody to use anything else than classical perlpod.
I’m afraid you’ve lost me there. I suppose I do occasionally use pod2text, usually on a exact pathname, sometimes in conjunction with pmpath to find a module path. Isn’t pod2text the classic program here? Why bother with anything else?
I honestly can’t think of any reason (apart from being trapped on Windows, I suppose) why anyone would use anything but the normal man program for reading Perl documentation. Occasionally I create PDF or HTML, but those are pretty special-purposed.
I have a bunch of little tools for dealing with modules and with pod. Here’s a partial list: balance-angles, balance-braces, balance-brackets, balance-parens, balanced,
basepods, catpod, catpodidx, faqpods, fmtpara, idxspell, modpods, okpod,
ora2pod, orphanX, pmall, pmcat, pmdesc, pmdirs, pmeter, pmeth, pmexp,
pmfunc, pminst, pmload, pmls, pmman, pmpath, pmvers, pod2docbook, pod2ora,
podcode, podgrep, podpath, pods, podtoc, shflpod, sitepods, splitpod,
stdpods, testpod, uniwc, xfootnotes, and xpod — just to name a few.
Here’s an illustration of the way I mix and match just a few of the more frequently used ones:
But for just reading things, I always use pod2text on uninstalled things and man on installed things. Anything else just gets in my way — but your mileage may vary, especially if you’ve been metricated. 😈
| [reply] [d/l] |