Hello!
On Fri, 18 Oct 2002, Nico Erfurth wrote:
> Alexander V Alekseev wrote:
> > Hello!
> >
> > Writing my own lookup type I found out several
> > features, which don't help developing. So, I made a few
> > small patches:
> >
> > 1. It's impossible to have '}' symbols in lookup keys.
> > But, sometimes it's quite usefull. Please, consider a patch:
>
> This patch is not THAT good, and not needed at all
> you can use brackets, if you escape them, like this
> ${lookup {$local_part\}$domain} lsearch {/etc/exim/strangelist}}
>
> Your patch could break things, see this example
>
> ${lookup {$local_part{$domain} lsearch {/etc/exim/strangelist}}
But it's syntaxically incorrect! You have 4 '{' and 3 '}' !
Don't you consider this a bug, not a feature?!
> This will work with an unpatched exim, but NOT with your version, so if
This shouldn't work at all!!!
> you need the closing bracket, just use \} or, if you use a string that
> should not be evaluated at all, you can enclose it with \N.
If I need unbalanced {}, I would use \} . But you advise to use
escapes when having balanced syntaxis, and unescaped {} when unbalanced!
Don't you think, it's wrong?
> Before patching, read the sources a little bit more careful ;)
> In fact, the escaping code is just 25 lines before your patched lines ;)
I've read the code. I've read the documentation. The code
doesn't follow the documentation. I've patched the code.
Bye. Alex.