Suggestion: an <Extensions> resource

2002-09-12 17:17:20
MHA has two extension mechanisms (besides filters and charset converters):

1. Callbacks (CBMessageBodyRead, CBRcVarExpand, etc.)

They both have problems:

1. You can register only one callback for each type.
2. You can have only one "".
3. Setting up "" may not be straightforward for the end user.

Let's examine the following true situation:

In HSMA I provided, as a bonus, a "" file that registers a 
CBRcVarExpand callback for those wishing to have a "Reply To" link in their 
pages (why I had to introduce a new resource variable, $X-MAILTOSUBJECT$, is 
a matter for a different discussion).

But the site in which MHA was installed already had a "" with 
its own callbacks.

Of course, these problems can be solved without modifying MHA: the user's code 
can first save the old callback address, install the new callback, and then 
each time the new callback runs it can execute the old saved callback. The 
"" singularity problem can be solved too.

But these problems can be solved elegantly in the MHA level:

1. Allow the user to register several callbacks of the same type. I.e., 
instead of:

    $mhonarc::CBRcVarExpand = \&my_callback_routine;



2. Allow the user to list all the files he wants to "require" (that is, the 
Perl function "require") in the resource file; for example:


When MHA starts it will require every file that is listed in the <Extensions> 

To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the

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