Re: [Mon-devel] Today's Mon 1.1 nits
Brought to you by:
trockij
From: Ed R. <er...@pa...> - 2005-02-17 15:41:52
|
On Thu, Feb 17, 2005 at 09:09:13AM -0500, David Nolan wrote: > >This is a feature I added to allow the user to define a different path > >for the M4 processor. I'm probably the only person who needs this, so > >it doesn't need to go into 1.0: > > > >- if (!open (CFG, "m4 $CF |")); > >+ if (!open (CFG, > >+ (exists($ENV{'MON_M4'}) ? $ENV{'MON_M4'} : "m4") > >. " $CF |") ); > > > > > > I like Peter's solution to this better, especially since Mon is not > currently directly using any other environment variables that are passed in > to it. I like Peter's solution better too - that was what I originally wanted to do, until I realized that... > ... it changes the semantics of -M, in that it now requires the m4 > path argument. Getopt::Std doesn't provide an option with optional > argument, as far as I can tell. And we also lose the abilility to test for command-line option errors (zero return status from getopt() ). Not that we're using it now, but it would be nice to have Mon refuse to run when given bad options. Conversion to Getopt::Long sounds much more sensible. |