[LON-CAPA-cvs] cvs: loncom / loncnew

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 01 Jun 2004 10:02:14 -0000


foxr		Tue Jun  1 06:02:14 2004 EDT

  Modified files:              
    /loncom	loncnew 
  Log:
  Make parameter passing meet standard using @_ not multiple shifts
  or English @ARG.
  
  
Index: loncom/loncnew
diff -u loncom/loncnew:1.46 loncom/loncnew:1.47
--- loncom/loncnew:1.46	Tue May 25 11:32:13 2004
+++ loncom/loncnew	Tue Jun  1 06:02:13 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # lonc maintains the connections to remote computers
 #
-# $Id: loncnew,v 1.46 2004/05/25 15:32:13 albertel Exp $
+# $Id: loncnew,v 1.47 2004/06/01 10:02:13 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -156,9 +156,9 @@
 =cut
 
 sub Log {
-    my $severity = shift;
-    my $message  = shift;
-   
+
+    my ($severity, $message) = @_;
+
     if(!$LogFormats{$severity}) {
 	$severity = "DEFAULT";
     }
@@ -193,8 +193,10 @@
 =cut
 
 sub GetPeername {
-    my $connection = shift;
-    my $AdrFamily  = shift;
+
+
+    my ($connection, $AdrFamily) = @_;
+
     my $peer       = $connection->peername();
     my $peerport;
     my $peerip;
@@ -217,16 +219,18 @@
 =cut
 
 sub Debug {
-    my $level   = shift;
-    my $message = shift;
+
+    my ($level, $message) = @_;
+
     if ($level <= $DebugLevel) {
 	Log("INFO", "-Debug- $message host = $RemoteHost");
     }
 }
 
 sub SocketDump {
-    my $level = shift;
-    my $socket= shift;
+
+    my ($level, $socket) = @_;
+
     if($level <= $DebugLevel) {
 	$socket->Dump();
     }
@@ -515,8 +519,8 @@
 
 sub CompleteTransaction {
     &Debug(5,"Complete transaction");
-    my $Socket = shift;
-    my $Transaction = shift;
+
+    my ($Socket, $Transaction) = @_;
 
     if (!$Transaction->isDeferred()) { # Normal transaction
 	my $data   = $Socket->GetReply(); # Data to send.
@@ -550,9 +554,8 @@
 =cut
 
 sub StartClientReply {
-    my $Transaction   = shift;
-    my $data     = shift;
 
+    my ($Transaction, $data) = @_;
 
     my $Client   = $Transaction->getClient();
 
@@ -1164,8 +1167,8 @@
 =cut
 
 sub StartRequest {
-    my $Lond     = shift;
-    my $Request  = shift;	# This is a LondTransaction.
+
+    my ($Lond, $Request) = @_;
     
     Debug(6, "StartRequest: ".$Request->getRequest());