I went with option C. The change is committed and ready for review:
http://poe.svn.sourceforge.net/viewvc/poe?view=rev&revision=2613
The commit message reads:
!!! This change breaks backward compatibility on a relatively unused
!!! feature. You are affected if you use ARG0 or ARG1 in a
!!! POE::Component::Server::TCP ClientConnected callback.
ClientArgs promised more than it could deliver, and people finally
noticed. This change backs off supplying the socket in $_[ARG0], and
it expands ClientArgs' arrayref into @_[ARG0..$#_]. Thanks to Michael
Fowler for rt.cpan.org #47855 (which this resolves), and POE's mailing
list for advice on which way this change should go.
--
Rocco Caputo - rcap...@pobox.com
On Jul 21, 2009, at 06:40, Olivier Mengué wrote:
Euh, well, I was meaning option A.
But either A or C is good for me.
Option B is too awkward as a bad API would stay forever and would
bite any
new Server::TCP user.
Le 21 juillet 2009 12:37, Olivier Mengué <olivier.men...@gmail.com>
a écrit
:
2009/7/16 Chris 'BinGOs' Williams <ch...@bingosnet.co.uk>
Anyways, I see three options:
a). Make the functionality match the documentation;
b). Make the documentation match the functionality;
c). Do what dngor suggests and flatten ClientArgs, forget the socket
and document as such.
Cheers,
As a POE::Component::Server::TCP user (useful to quickly write
tests for
client components), I prefer option C as I complained about 2
months ago :
http://www.mail-archive.com/poe@perl.org/msg04260.html
Olivier Mengué.