Description: Dont clobber  $_ global variable
 replace $_ with a lexical varable. A similar patch has 
 been applied upstream.
 .
 This patch should be removed for Mojolicous >= 3.38
Bug: Debian-686750
Author: dod
Applied-Upstream: yes
--- a/lib/Mojo/Transaction/WebSocket.pm
+++ b/lib/Mojo/Transaction/WebSocket.pm
@@ -297,9 +297,10 @@
 
   # 512 byte mask
   $mask = $mask x 128;
-  my $output = '';
-  $output .= $_ ^ $mask while length($_ = substr($input, 0, 512, '')) == 512;
-  return $output .= $_ ^ substr($mask, 0, length, '');
+  my $buffer = my $output = '';
+  $output .= $buffer ^ $mask 
+	while length($buffer = substr($input, 0, 512, '')) == 512;
+  return $output .= $buffer ^ substr($mask, 0, length $buffer, '');
 }
 
 1;
