[texdoc] nonstandard arg parsing

Reinhard Kotucha reinhard.kotucha at web.de
Sun Sep 21 20:19:14 CEST 2008


Manuel Pégourié-Gonnard writes:
 > More interesting may be this (surprisingly small) this "POSIX-style" (I
 > didn't event know that POSIX said anything about command-line options)
 > implementation of getopt:
 > 
 > http://lua-users.org/wiki/AlternativeGetOpt
 >
 > I'll probably have a serious look at it soon, since it looks quite ok to
 > me (I really don't think we need something as big as Perl's
 > Getopt::Long, do we?)

Hi Manuel,
you can use it if you want, it's probably a good starting point.
However, you don't have to declare arguments in advance, hence you
have to check validity of arguments later.  You also have to
parse the arglist again in order to get the mandatory arguments.

Writing a useful getopt function is not a weekend project.  But I
think we have to write one ourselves which replaces getopt.tlu we have
in TL later.  What is there already is only a quick hack for the time
being.

BTW, did you test the experimental getnonfreefonts version with http
support?  I added now

    Getopt::Long::Configure ("bundling");

and the following works

getnonfreefonts -la --verbose

while the current version doesn't allow bundling of short options.
Maybe you want to download it again.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texdoc mailing list