[Cook] Match mode appears to be broken

Jason Evans jasone at canonware.com
Sat Jun 21 02:22:04 EST 2003


On Thu, Jun 19, 2003 at 01:00:43PM -0400, Jody Hagins wrote:
> 
> I have been fighting with a problem in my cookfile, and have been able
> to simplify it to a small example.  Basically, once I change the match
> mode to REGEX, I can not get cook to recognize the "match-mode-cook"
> again.  The following cook file demonstrates the problem.

I don't think this is a bug.  Rather, it's a quirky aspect of flag
contexts, specifically in the global case.  As near as I can tell (from
memory), global flag settings like the following:

> set match-mode-regex;
> set match-mode-cook;

are locked to the first setting that is encountered.  I'm guessing that
Peter did this so that it's possible to definitively/deterministically
override flag settings, say, on the command line.

This works just fine in most cases, but in some cases it would be nice to
create a generic lexical scope for flag settings.  However, I haven't run
into a situation where it was essential for my purposes, so I haven't given
much thought to how such a feature would integrate with cook.

Jason



More information about the Cook-users mailing list