perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1844425 - /perl/Apache-Test/trunk/lib/Apache/TestRequest.pm
Date Sat, 20 Oct 2018 16:10:00 GMT
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 {



Mime
View raw message