[LON-CAPA-cvs] cvs: loncom / LondConnection.pm

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


foxr		Tue Jun  1 06:05:16 2004 EDT

  Modified files:              
    /loncom	LondConnection.pm 
  Log:
  Match parameter receiving to coding standard when # parameters is > 1.
  
  
Index: loncom/LondConnection.pm
diff -u loncom/LondConnection.pm:1.29 loncom/LondConnection.pm:1.30
--- loncom/LondConnection.pm:1.29	Tue Mar  2 17:38:07 2004
+++ loncom/LondConnection.pm	Tue Jun  1 06:05:16 2004
@@ -1,7 +1,7 @@
 #   This module defines and implements a class that represents
 #   a connection to a lond daemon.
 #
-# $Id: LondConnection.pm,v 1.29 2004/03/02 22:38:07 albertel Exp $
+# $Id: LondConnection.pm,v 1.30 2004/06/01 10:05:16 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -89,8 +89,8 @@
 #                 to build up the hosts table.
 #
 sub ReadForeignConfig {
-    my $MyHost   = shift;
-    my $Filename = shift;
+
+    my ($MyHost, $Filename) = @_;
 
     &Debug(4, "ReadForeignConfig $MyHost $Filename\n");
 
@@ -108,8 +108,9 @@
 }
 
 sub Debug {
-    my $level   = shift;
-    my $message = shift;
+
+    my ($level, $message) = @_;
+
     if ($level < $DebugLevel) {
 	print($message."\n");
     }
@@ -143,8 +144,9 @@
 =cut
 
 sub Transition {
-    my $self     = shift;
-    my $newstate = shift;
+
+    my ($self, $newstate) = @_;
+
     my $oldstate = $self->{State};
     $self->{State} = $newstate;
     $self->{TimeoutRemaining} = $self->{TimeoutValue};
@@ -174,9 +176,8 @@
 =cut
 
 sub new {
-    my $class    = shift;	# class name.
-    my $Hostname = shift;	# Name of host to connect to.
-    my $Port     = shift;	# Port to connect 
+
+    my ($class, $Hostname, $Port) = @_;
 
     if (!$ConfigRead) {
 	ReadConfig();
@@ -535,8 +536,8 @@
 =cut
 
 sub InitiateTransaction {
-    my $self   = shift;
-    my $data   = shift;
+
+    my ($self, $data) = @_;
 
     Debug(1, "initiating transaction: ".$data);
     if($self->{State} ne "Idle") {
@@ -587,8 +588,9 @@
 =cut
 
 sub SetTimeoutCallback {
-    my $self                 = shift;
-    my $callback             = shift;
+
+    my ($self, $callback) = @_;
+
     my $oldCallback          = $self->{TimeoutCallback};
     $self->{TimeoutCallback} = $callback;
     return $oldCallback;
@@ -716,8 +718,8 @@
 =cut
 
 sub Encrypt {
-    my $self    = shift;		# Reference to the object.
-    my $request = shift;	        # Text to send.
+    
+    my ($self, $request) = @_;
 
    
     # Split the encrypt: off the request and figure out it's length.
@@ -759,8 +761,8 @@
 =cut
 
 sub Decrypt {
-    my $self      = shift;	# Recover reference to object
-    my $encrypted = shift;	# This is the encrypted data.
+
+    my ($self, $encrypted) = @_;
 
     #  Bust up the response into length, and encryptedstring: