I have taken over maintenance of HTTP::Daemon::SSL and I have a dilemma.

HTTP::Daemon::SSL's accept() method is supposed to return false if the IO::Socket times out without a connection (unless the timeout is 0 of course, in which case it will never return). This is in conformance with the documentation for HTTP::Daemon which (on this point) HTTP::Daemon::SSL's documentation does not indicate variance. HTTP::Daemon::SSL does not do this, however, as it has a while(1) loop in it's overridden accept() method.

My problem is this - in fixing this I may break code that uses HTTP::Daemon::SSL and assumes this built-in while loop. I'm not too concerned as any code which also works with HTTP::Daemon will work after this fix, but I'm wondering what people feel the etiquette is in this situation.

For instance, the current version is 1.02 - should I change the version to 2.0 to signify a change in the API (even though the published API doesn't change - the functionality is simply coming into step with the docs)? Are there any other ways I can mitigate impact?

Update: As requested by Corion, here is a code sample. The following code will exit cleanly with a HUP if $daemon is an instance of HTTP::Daemon, but not if it is an instance of HTTP::Daemon::SSL 1.02:

$SIG{HUP} = sub { $__server_should_run = 0; }; $__server_should_run = 1; while ($__server_should_run) { my $conn = $daemon->accept or next; # handle request }

In reply to Correcting/changing a CPAN module interface by aufflick

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.