fetchmail-friends
[Top] [All Lists]

Re: broken plugin code

2001-02-19 14:40:08
Todd Sabin <tas(_at_)webspan(_dot_)net>:

So, I've been using 5.3.x for a while, and am trying out the new 5.6.6.
I'm rather dumbfounded to find the new, more elaborate, plugin support.
I fail to see what it buys you that you can't get simply by wrapping
your plugin in a shell script and using $1 and $2 to good effect:

E.g., instead of plugin "/usr/local/ssl/bin/openssl s_client -quiet -connect 
%h:%p"

just use plugin /usr/local/bin/ssl_connect:

$ cat /usr/local/bin/ssl_connect 
#!/bin/sh
/usr/local/ssl/bin/openssl s_client -quiet -connect $1:$2

which is what I've been doing up till now.

Furthermore, there's actually a pretty bad bug in the plugin code
which causes it to SIGSEGV on my machine.  I'm surprised that it works
for anyone.  I suggest killing the new plugin stuff entirely, as it
seems to violate the "No adding code to do things that can just as
easily be done with wrappers" guideline.  Below is a patch to do that.

Hm.  I didn't realize it could be emulated that easily, or I wouldn't
have put it in.  Having put it in, however, I'm a bit reluctant to remove
it.  I'll stare at it for a while.
-- 
                <a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>

"The bearing of arms is the essential medium through which the
individual asserts both his social power and his participation in
politics as a responsible moral being..."
        -- J.G.A. Pocock, describing the beliefs of the founders of the U.S.


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