I came across the following code in Net::SSLeay:
sub do_https4 { splice(@_,1,0) = 1; do_httpx4; } # Legacy undocumente +d

The trouble is that this code doesn't actually compile. I'm guessing this doesn't matter (at least on some level) because the module uses AutoLoader so the above code doesn't get compiled unless someone calls do_https4.

However in order to debug Net::SSLeay I've temporarily prevented it from auto-splitting so I've had to remove the bogus code.

What I'm curious about is what the code is supposed to do! Is it a fact that in some previous version of Perl this code behaved like:

sub do_https4 { splice(@_,1,0,1); do_httpx4; }

And if so when did this change?


In reply to Legacy use of splice() as lvalue by nobull

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.