ietf-mta-filters
[Top] [All Lists]

Re: variables: interaction with "require"

2003-04-13 22:21:36


this can happen:

  require "variables";
  require "file${foo}into";

according to current spec, this should work, since ${foo} expands to
the empty string.  how about

  require [ "variables", "file${foo}into" ];

should it work?  and how about

== main script ==
  require [ "include", "variables" ];
  set "ext" "fileinto";
  include "/personal/test";

== /personal/test ==
  require "variables";
  require "${ext}";
  fileinto "INBOX";

this must not work, since each included script must be parsable on its
own (according to the current include draft).  but if you change it
into

== /personal/test ==
  require "variables";
  require "file${ext}into";
  fileinto "INBOX";

it will work on its own, but bomb when included from the main script.

I don't see how variable expansion in the arguments to require can
ever be useful.  I suggest adding to the introduction:

  The mechanisms detailed in this document will only apply to Sieve
  scripts which include a require clause for the "variables" extension.
+ The require clauses themselves are not affected by this extension.

I agree with this proposed solution to the problem.

                                Ned