in reply to Re^2: RFC: Net::SMTP::Pipelining
in thread RFC: Net::SMTP::Pipelining

Inheriting from it is of course the next best thing. I probably should have mentioned that straightaway. People who want pipelining enough who are currently using Net::SMTP will no doubt be happy that only minor changes to their code are necessary.

As a matter of fact, from a cursory inspection it seems it shouldn't take me much effort to clone what you have here and have it inherit from Net::SMTP::TLS instead. I'd like to take a crack at that sometime soon if I have your blessing to do so.

Now that I think about it, having Net::SMTP::Pipelining and Net::SMTP::TLS::Pipelining (or should that be Net::SMTP::Pipelining::TLS?) wouldn't be such a bad idea. It is a great and useful feature, but it's not necessary for everyone. Keeping it out of the API of existing modules might be better in the long run. Now I'm torn.

Replies are listed 'Best First'.
Re^4: RFC: Net::SMTP::Pipelining
by tirwhan (Abbot) on Feb 18, 2009 at 19:54 UTC
    I'd like to take a crack at that sometime soon if I have your blessing to do so.

    Absolutely, go for it. I still feel kinda queasy about the idea of duplicating code in two different modules. So maybe (thinking out loud here) it would be better to build a switch into Net::SMTP::Pipelining that makes it use Net::SMTP::TLS as the base class when it's called as Net::SMTP::TLS::Pipelining->new(). That would be messy internally but avoid duplication.

    And I'm not entirely sure that extending the incompatible API of Net::SMTP::TLS even further is the right way to go. It seems to me that a better way (in the long run) would be to create modules which add the extra functionality of Net::SMTP::TLS to a subclass of Net::SMTP (e.g. creating Net::SMTP_TLS and improving Net::SMTP_auth). Given that Net::SMTP::TLS does no longer seem to be very actively maintained, that way we could have all SMTP functionality that people want collected under one namespace and core module. But whatever rocks your boat :-).

    If you do create another module I'd call it Net::SMTP::TLS::Pipelining (not NS::Pipelining::TLS) though. NS::TLS is distinct from the other NS modules, so keeping stuff that's specific to it under it's namespace makes sense to me.


    All dogma is stupid.