Hi. I'd like to see mail()
function in separate extension module. It would be
possible to replace i.e. standard extension=mail.so' with i.e.
extension=sendmail.so'.
What do you think? Is it worth to prepare the patch?
.''. Piotr Roszatycki, Netia SA : :' : mailto:Piotr_Roszatycki@netia.net.pl
. ' mailto:dexter@debian.org
Drop-in replacements are evil. If you want to do this, you should
just create a new function that does what you need to do and name it
differently. If you're dead-set on doing a name-based replacement,
then you should have your extension modify the symbol table directly,
but again, this is evil.
George
Hi. I'd like to see
mail()
function in separate extension module.
It would be
possible to replace i.e. standardextension=mail.so' with i.e.
extension=sendmail.so'.What do you think? Is it worth to prepare the patch?
.''
. Piotr Roszatycki, Netia SA : :' : mailto:Piotr_Roszatycki@netia.net.pl
.' mailto:dexter@debian.org
---
George Schlossnagle
-- Vice President of Engineering
-- OmniTI Computer Consulting
-- http://www.omniti.com
Drop-in replacements are evil. If you want to do this, you should
just create a new function that does what you need to do and name
it differently. If you're dead-set on doing a name-based
replacement, then you should have your extension modify the symbol
table directly, but again, this is evil.George
George,
Can you please substantiate your statement that drop-in replacements
are evil?
I could only see them being a problem if they don't fully implement
the existing API.
Andrew
Andrew Yochum
Plexpod
andrew@plexpod.com
Drop-in replacements are evil. If you want to do this, you should
just create a new function that does what you need to do and name
it differently. If you're dead-set on doing a name-based
replacement, then you should have your extension modify the symbol
table directly, but again, this is evil.George
George,
Can you please substantiate your statement that drop-in
replacements are evil?I could only see them being a problem if they don't fully implement
the existing API.
Sure. They inevitably will have differing behaviors (if not, why not
just have a single unified function). Given that, you'll have
different behaviors on different machines in a way that is not
terribly transparent to end-users. That's evil.
Not that there's anything wrong with being evil from time to time.
That's the reason that apd had a replace_function call for mucking
with the symbol table. But that's something that should be done
locally.
George
Sure. They inevitably will have differing behaviors (if not, why not
just have a single unified function). Given that, you'll have
different behaviors on different machines in a way that is not
terribly transparent to end-users. That's evil.
In fact the replacement for mail()
function have to be transparent for
end-users. They won't replace manually calls for mail()
function with i.e.
mail_smtp() function. That is the reason I would like to replace original
function.
--
.''. Piotr Roszatycki, Netia SA : :' : mailto:Piotr_Roszatycki@netia.net.pl
. ' mailto:dexter@debian.org