RE: [Mon-devel] Today's Mon 1.1 nits
Brought to you by:
trockij
From: Peter W. (MO/EMW) <pet...@er...> - 2005-02-17 14:48:44
|
If you dont use -M, but the file =~ /\.m4$/ "m4" is executed If you use -M, "m4" is executed If you use -M/usr/local/bin/nroff, "/usr/local/bin/nroff" is executed So -M does NOT require path... if ( exists($opt{"M"}) || $CF =~ /\.m4$/) { my($m4) = $opt{"M"} || "m4"; return "could not open m4 pipe of cf file: $CF: $!" if (!open (CFG, "$m4 $CF |")); } else { return "could not open cf file: $CF: $!" if (!open (CFG, $CF)); } /Peter > -----Original Message----- > From: mon...@li... > [mailto:mon...@li...]On Behalf Of David Nolan > Sent: den 17 februari 2005 15:09 > To: mon...@li... > Subject: Re: [Mon-devel] Today's Mon 1.1 nits > > > > > --On Wednesday, February 16, 2005 7:41 PM -0500 Ed Ravin > <er...@pa...> > wrote: > > > This is a problem in Mon 1.0 also - that extra backslash > shouldn't be > > there: > > > > -if ($^O eq "linux" || $^O =~ /^(open|free|net)bsd\$/ || > $^O eq "aix") > > +if ($^O eq "linux" || $^O =~ /^(open|free|net)bsd$/ || > $^O eq "aix") > > > > Without this fix syslog goes to UDP (and therefore gets > lost) on the BSDs. > > > > I'll commit that fix shortly... > > > > ------------------------ > > > > 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. But 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. If I convert mon to using > Getopt::Long > then we can make the argument to -M optional. I'm doing that > now... Ooh, > and I found a couple errors in the process. -k was > documented but not > processed, and -O and -o were processed but not used. I've > add -k, fixed > -O, and purged -o. > > Committing now... > > -David > > David Nolan <*> vit...@cm... > curses: May you be forced to grep the termcap of an unclean yacc while > a herd of rogue emacs fsck your troff and vgrind your pathalias! > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from > real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Mon-devel mailing list > Mon...@li... > https://lists.sourceforge.net/lists/listinfo/mon-devel > |