[Boulder.pm] Trickey (for a newbie) String Replacement
Peter Hutnick
pm at hutnick.com
Thu May 6 14:22:10 CDT 2004
Rob Nagler wrote:
> Peter Hutnick writes:
>
>>I'm not following you here. I've used getopts that way. Maybe I just
>>don't know the "bad" way?
>
>
> If you say:
>
> use Foo::Bar;
Oh. I lied. But it's fixed now ;-)
> You allow Foo::Bar to pollute your name space with whatever it likes
> for all time. You relinquish control of your naming. That's why
> @EXPORT_OK is not ok imho. I can see people wanting to bring in names
> with:
>
> use Foo::Bar qw(foo bar);
>
> That's a laziness thing, and in certain cases it makes sense.
What's the non-lazy way to use the functions in a package?
Any idea how to fix the opposite problem of typo warnings when you
"reach down into" the module? (E.g. $Getopt::Std::opt_h)
> If $anything contains something that isn't defined and then all of a
> sudden it becomes defined, well, there you go, you've got new
> semantics and you have to figure out which of your 100 rules is
> causing them.
>>You might consider revising "subject matter oriented program evolves" in
>>the first paragraph to "subject matter oriented program (SMOP) evolves."
>
>
> Done.
Cool!
>>The rules are going to end up in a separate file that lives with the
>>LaTeX file it works with.
>
>
> Cool. Could you not create a latex style sheet that would do the work
> of converting your latex to html?
Yes, I could not. I actually don't know the first thing about LaTeX
style sheets. Do they really generate non TeX text output?!
>>As I said before, generality seems unachievable for this
>>application.
>
>
> Never. ;-) Check out doclifter. It is simply amazing. However,
> your customer (even that person is yourself) probably doesn't want to
> pay for any more generalization than is absolutely necessary.
I don't think I was clear. The two do not share a 1:1 correspondence.
Any mapping that I devise could fail with a different input.
The biggest killer is the fact that TeX lets you make new commands.
Guaranteed failure right there.
So I have settled on a sort of meta-language for describing how /my/
document is best represented in HTML, and s script to implement those rules.
A significant portion will be relevant to some other arbitrary LaTeX
file, so a few simple changes to the rules file will allow applicability
to any other file.
-Peter
PS: I am really enjoying and learning from this discussion.
More information about the Boulder-pm
mailing list