develooper Front page | perl.perl5.porters | Postings from September 2001

Re: [perlhelp] some notes on windows problems

Thread Previous | Thread Next
From:
Sean M. Burke
Date:
September 29, 2001 13:31
Subject:
Re: [perlhelp] some notes on windows problems
Message ID:
3.0.6.32.20010929143048.007c63a0@mail.spinn.net
At 04:02 PM 2001-09-29 +0100, Jonathan Stowe wrote:
>[...]
>For binary distributions (which is probably the majority of installations
>on Win32) this isnt so much of a problem.  I havent looked at the module
>in question so I dont know what it does but if it doesnt do it already
>then Pod::RTF could be used and thence the help file compiler which is
>almost certainly available in most native Win32 compiler kits we support (
>I am guessing that the cygwin people could care less about windows help
>files :)
>[...]

One thing I hacked perldoc for, once, was allowing naming an arbitrary
class (in some env var) for formatting.  And I then set that env var to the
name of my (unreleased) pod2rtf.  Not helpfile RTF, real RTF.  And when
perldoc wakes up that class and sics it on a filespec like
c:/perl/lib/Foo/Bar.pm, that formatter class sees if there's a
c:/perl/lib/Foo/Bar.rtf, it opens wordpad on it (which is very lightweight
and fast).  If there is no such file (or if the input file was modified
after the .rtf file), then it makes the file, and opens wordpad on it.
(And either way, it signals to perldoc that it shouldn't open a pager on
anything; my class calls system("write.exe", "c:\perl\lib\Foo\Bar.rtf") on
its own, or whatever the incantation is.)

Wordpad doesn't understand every last RTF directive, but it does just fine.

I don't recall what my class does if/when it finds that it can't write to
the directory that the .pm (or .pod, etc.) file is in.
perldoc output that doesn't correspond to a single input file (like perldoc
-f foo) opens a new RTF file in the temp dir.

There's no hyperlinks in my RTF.  That hasn't bothered me much.
I should release this formatter class some time.  I know there's no end of
pod2rtfs in CPAN, but MINE'S BIGGER!  Er, better.  Time-tested too; I've
been using to for months, both for just wordpad viewing, and for making
high-koalaity hardcopies via MSWord or whatever else can read decent RTF.
It's based on Pod::Tree, BTW.

One could say that rendering to HTML would be a better idea, but:
1) if you don't have a browser open, then opening one involves a bit of a
wait, whereas a wordpad window opens in no time at all;
2) I can't figure out how to open a /new/ instance of a browser window (for
whatever browser is the default *.html handler).  When you have a browser
running, "start foo.html" opens it in an already-open window (stomping on
whatever was there), which is pretty annoying; whereas "write foo.rtf"
always opens a new wordpad instance (unless, possibly, you already have a
window open on that foo.rtf)

I don't recall if there's wordpad on Win95 or old NTs.  If those have just
bad old Notepad (with its 32K file limit?), then that's a problem.


--
Sean M. Burke  sburke@cpan.org  http://www.spinn.net/~sburke/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About