in reply to Legacy use of splice() as lvalue

FWIW, it doesn't even compile on older versions (tried several, going back to v5.005_03 — same error as in v5.8).

BTW, I think the "legacy" is referring to the subroutine do_https4 itself, not to the weird usage of splice within it...  so you're probably okay simply removing that piece of code.

Update: another indication that this code has never really been in use is that if the idea is to modify the argument list prior to calling the wrapped do_httpx4, it would have to be called as &do_httpx4 to actually make @_ visible to that subroutine...

Replies are listed 'Best First'.
Re^2: Legacy use of splice() as lvalue
by nobull (Friar) on Feb 15, 2008 at 17:29 UTC
    Update: another indication that this code has never really been in use is that if the idea is to modify the argument list prior to calling the wrapped do_httpx4, it would have to be called as &do_httpx4 to actually make @_ visible to that subroutine...

    Yes, I noticed that initially, then somehow it slipped my mind before I posted.

    I'm getting more and more convinced that much of Net::SSLeay is the software equivalent of introns.

    Here's another

    sub do_httpx4 { my ($page, $response, $headers, $server_cert) = &do_httpx3; X509_free($server_cert) if defined $server_cert; my %hr = (); for my $hh (split /\s?\n/, $headers) { my ($h,$v)=/^(\S+)\:\s*(.*)$/; push @{$hr{uc($h)}}, $v; } return ($page, $response, \%hr); }

    If you notice the variable $hh is not used and the m// operator is acting on whatever happens to be in $_.

    Am I really looking at the current version of the module (version 1.32 on CPAN)?

      Am I really looking at the current version of the module (version 1.32 on CPAN)?
      Not only that: both code fragments are still, unchanged, in the latest developer release, Net-SSLeay-1.33_01, released 2 days ago.

      Wow. Just wow.