Thu, 09 Aug 2001 21:49:26 -0400
> This is some very nice software, I love it!
> It needs some refactoring though, and I want to know if anyone would mind
> if I took a swing at it. I'm new to TeX, but a pretty sure hand at Perl.
I wholeheartedly agree with you on both points!
It is great software --- and it's direly in need of updating!
I'd suggest deciding early on just how far you want to go, though. :>
In particular, maintaining compatibility with the multitude
of special perl style files, and customizations and whatnot out
there will severely limit the rewrite. OTOH, breaking compatibility
will raise some howls!
[OT3rdH it would have been easier to implement styles, customizations,
etc. with a nice API!]
Obviously, you've already got some of your own ideas, but I'll offer
1) I'll bet there's some minor performance benefit, and major
bug-reduction, by replacing most local by my. Of course you've got
to be careful, as many of those, intentionally or not, are
binding' (or whatever Perl thinks that is) variables for use by
2) Common subexpression ellimination: It's probably only a minor
exaggeration that l2h would be cut in half by replacing all the
get_arg expressions by a call to a get_arg sub.
I tested that once; I forget the actual size reduction, but it
was certainly more readable. it worked fine on my examples, but I
think Ross was worried there would be some hidden breakage.
3) Dont use empty keys in db tied hashes. Perl claims that's allowed,
but redhat doesn't seem to care.
Fuzzy zone changes (might be incompatible with some stuff)
1) use strict; and suffer for a month until it finally runs again. :>
2) Use objects/hashes/arrays for many of the things that're currently
packed into strings.
1) Use proper objects/modules for a lot of stuff: sections, equations,
etc. It would localize a lot of stuff that's currently spread
throughout l2h, and could provide hooks for customization.
I did some experimentation here, but it's really hard to integrate
unless you commit to doing it wholesale (and breaking
PS: None of the above is intended to denigrate any past or current
l2h developers, especially not Ross!!!