But you shouldn't build on prior art until you understand why the prior art is there.
I suspect (but am waiting for confirmation) that japhy was not aware of the
callback parameter, which would have reduced his program to about half its size,
and then it would have handled proxy servers and all protocols, not just HTTP.
in reply to RE: to post, or not to post...
in thread to post, or not to post...
The problem with reinventing things is that you now have two or more incompatible mechanisms to accomplish a task, which dilutes the effort,
and can confuse the marketplace (should I use X or Y interface, since both seem
to be in the CPAN?).
Witness News::NNTPClient, an interesting implementation that
predated Net::NNTP, but is now abandoned. I wrote quite a few
programs using the old interface, but have finally just recently succeeded
in cutting them all over. And I did that because I know that Graham Barr
will be around to update Net::*, but who knows about any efforts to pick
up the other package.
SImilarly, a solution based on top of LWP will very likely continue
to work and get bug fixes, because I know that LWP will continue to be
maintained for some time to come. But if japhy submits his independent
code to the CPAN, will he notice when Gisle updates LWP for a security fix,
and re-implement that? I think not.
So, the code doesn't do as much as LWP, won't be maintained the same way
as LWP, and doesn't leverage off the existing code in any big way. Do you think
I can recommend this little code for any production work? Hardly not.
Now, if japhy writes code that uses the LWP callback, the codesize will be reduced,
everything will play well with proxies and new underlying protocols, and the
chances that the code will be maintained will be greatly increased. Everyone wins.
I encourage japhy to rewrite the code to use the callback, and submit it.
I would not encourage the current code to be submitted.
-- Randal L. Schwartz, Perl hacker