Re: BUG: variables.pl

New Message Reply Date view Thread view Subject view Author view Attachment view

From: Greg (glawler@westmont.edu)
Date: Wed Aug 23 2000 - 12:51:50 CDT


cool, i didn't pick that up... i just commented out the if ($AUTH_METHOD
= "FTP") { use Net::FTP; } line :)

greg

ps as we speak students are registering and i'm watching the subnet
overview numbers climb rapidly :)

Peter Valian wrote:
>
> All,
>
> I have found a bug that's been bugging us (guess thats why they call 'em
> bugs).
> In version 1.2, variables.pl:
>
> $AUTH_METHOD = "POP"; # possible values: (FTP|POP)
> if ($AUTH_METHOD = "POP") { use Mail::POP3Client; }
> if ($AUTH_METHOD = "FTP") { use Net::FTP; }
>
> the problem is in the if statements...it's not using the comparison
> operator, it's using the assignment operator.
>
> The reason this is a legal statement is because the evaluation of an
> assignment is true.
>
> It should be:
>
> $AUTH_METHOD = "POP"; # possible values: (FTP|POP)
> if ($AUTH_METHOD == "POP") { use Mail::POP3Client; }
> elsif ($AUTH_METHOD == "FTP") { use Net::FTP; }
>
> NOTE: the second 'if' should really be an 'elsif' since there is no
> reason to evaluate it if the first 'if' statement is true.
>
> This will be fixed in the next version...we were wondering why NetReg
> was using FTP to authenticate instead of POP. It was because the second
> 'if' was setting
> $AUTH_METHOD equal to FTP.
>
> Sorry.
>
> -peter
>
> --
> Peter Valian
> Network & Systems Administator
> Southwestern University
> Georgetown, Texas
> 512.863.1586
> --
> **********************************************************************
> To unsubscribe from this list, send an e-mail message to
> majordomo@southwestern.edu containing a single line with the words:
> unsubscribe netreg
> Send requests for assistance to: owner-netreg@southwestern.edu
> **********************************************************************

-- 
____________________________________
             Greg Lawler
        Network Administrator
  grinch@westmont.edu 805.565.7249
  http://zulu.westmont.edu/routers
____________________________________
**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg
Send requests for assistance to: owner-netreg@southwestern.edu
**********************************************************************

New Message Reply Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:34 CDT