Eli Sand wrote:
> > warn acl=some_acl($var1, $var2)
> > or keeping with the exim sense:
> > acl=some_acl{$var1}{$var2}
>
> I figured that would be what a lot of people would think it'd end up looking
> like, however where did you get $var1 and $var2 from to pass to the acl? :)
> In reality, your line might end up looking like this:
>
> warn set $var1="some data"
> set $var2="more data"
> acl=some_acl{$var1}{$var2}
Actually, in that case, it would look more like:
acl=some_acl{some data}{more data}
> Now, replace my nice, uncluttered strings with some real Exim configuration
> jibberish (I'm too lazy to dig in my confs to get real world examples - but
> many of us know they can be somewhat long lines). As you can see, to make
> the call to the acl uncluttered with local variables, you still had to set 2
> variables, which could very well be global in the first place and then local
> variable passing isn't needed.
True. If the idea ever does get implemented, scoping could be hairy.
Without reading the ACL code, I don't know how bad it would be.
> Worse yet, say there was a way to execute commands in the call to the acl so
> you had something like this:
>
> warn acl=some_acl{if eq {...}{...} etc... {...blah blah...}{else
> ...}}{{you get the idea...}
There's always someone who will make something simple overly complex.
> Now, tell me that you wouldn't rather see a heap of braces like that then
> prefer to keep our global variables?
It's 1 line =)
There's always the same thing happening in other languages. Like perl!
> However, perhaps an overhaul of the entire parsing lexer might be a faaaaar
> off wishlist item, and in doing so perhaps may allow for a much nicer,
> graceful way of having local variables without all this potential havoc -
> THAT's something I'd vote for :P
I think it would be nice if it was more like a real language constructs.
Ie:
if (rbl($host)) deny;
> Or perhaps I've smoked something I shouldn't have and I'm confusing simple
> matters (wouldn't be a first)?
Maybe. I'm not really trying to get this into exim. I just thought about
it some time ago (even sent an email months back about it).
--
Lab tests show that use of micro$oft causes cancer in lab animals
Got Gas???