[exim-dev] [Bug 167] Make "true" and "false" valid expansion…

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: exim-dev
Subject: [exim-dev] [Bug 167] Make "true" and "false" valid expansion conditions
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=167




--- Comment #17 from Phil Pennock <exim-dev@???> 2008-09-16 00:20:09 ---
(In reply to comment #16)
> What do you think of wrapping the generic condition in bare braces, i.e.
> eliminating the bool keyword? So the following would be roughly equivalent...


For myself, I like the proposed syntax (first two cases, but see below). But
for explaining it, time after time, to those people who visit exim-users and
refuse to read documentation, I'm not so sure. I'm also not so sure that bool
should be eliminated, as opposed to made an implicit default -- some people
will prefer to see the explicit bool in their configs and I'm, in some cases,
one of those people: I like stuff to be cleanly self-documenting and will
happily do things like, in Perl, use the 'scalar' keyword explicitly, even in
clearly scalar context. I think this is somewhat the same. Doesn't mean that
I'll force this on others, just that I don't think bool{} should disappear
entirely.

Going from memory, it should be fairly simple to code as a check in the ECOND_*
area, if the next character is a { then implicitly bool.

However,
> ${if and{{ $acl_m_foo }{ $acl_m_bar }} }


The basic proposal would require:
${if and {{ {$acl_m_foo} }{ {$acl_m_bar} }} }
to have the extra bare braces. To accept your syntax here, wouldn't each of
the possible boolean values need to become an ECOND_* token? Or just handled
explicitly, same as for a bare "{"?

I'm not so sure I like where that's going.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email