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

Re: Include 04 export/import

2006-06-14 16:23:37

On Wed, Jun 14, 2006, Kjetil Torgrim Homme 
<kjetilho(_at_)ifi(_dot_)uio(_dot_)no> said:

[VARIABLES] says:

    Unknown variables are replaced by the empty string.

it's not an error.

Thanks, I was looking for that reference. I grepped for "undefined" and
"undeclared" and "unset" -- "unknown" was not the word I expected :-P

An included script could pull in more variables than were exported, and
simply find that some of them are not defined. For example, a :global
script might have some documented functionality like, "export ${this}
for some useful behavior, and ${that} for some other useful stuff." A
user might only set ${that}, but the script has imported both ${this}
and ${that}. I don't think it should cause an error.

I agree.

   If an "import" command lists a variable that has not been exported
   and set by any other script at that point during the SIEVE execution
   process, then an error MUST occur.

I suggest that "and set" is removed.  remember that changes made to the
imported variable will be visible in the parent.  this is how values are
returned from "calling" sub-scripts, and it would be strange to require
the parent to set it prior to the call.  this should probably made clear
in the draft.

Would a read-only modified be useful here? For example:

    export :readonly "testvar"

Also, would you still want to consider it an error to import a variable
that was not already exported? I'm on the fence about this.

Aaron

<Prev in Thread] Current Thread [Next in Thread>