You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by rj...@apache.org on 2018/10/20 16:10:00 UTC

svn commit: r1844425 - /perl/Apache-Test/trunk/lib/Apache/TestRequest.pm

Author: rjung
Date: Sat Oct 20 16:10:00 2018
New Revision: 1844425

URL: http://svn.apache.org/viewvc?rev=1844425&view=rev
Log:
IO::Socket::SSL has a working getline().

Modified:
    perl/Apache-Test/trunk/lib/Apache/TestRequest.pm

Modified: perl/Apache-Test/trunk/lib/Apache/TestRequest.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestRequest.pm?rev=1844425&r1=1844424&r2=1844425&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestRequest.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestRequest.pm Sat Oct 20 16:10:00 2018
@@ -304,27 +304,9 @@ sub vhost_socket {
     }
 }
 
-#IO::Socket::SSL::getline is nothing like IO::Handle::getline
-#could care less about performance here, just need a getline()
-#that returns the same results with or without ssl
-my %getline = (
-    'IO::Socket::SSL' => sub {
-        my $self = shift;
-        my $buf = '';
-        my $c = '';
-        do {
-            $self->read($c, 1);
-            $buf .= $c;
-        } until ($c eq "\n" || $c eq "");
-        $buf;
-    },
-);
-
 sub getline {
     my $sock = shift;
-    my $class = ref $sock;
-    my $method = $getline{$class} || 'getline';
-    $sock->$method();
+    $sock->getline();
 }
 
 sub socket_trace {