version 1.15, 2003/10/28 11:15:10
|
version 1.16, 2003/11/04 11:11:08
|
Line 46 my %hostshash;
|
Line 46 my %hostshash;
|
my %perlvar; |
my %perlvar; |
|
|
# |
# |
|
# Set debugging level |
|
# |
|
sub SetDebug { |
|
$DebugLevel = shift; |
|
} |
|
|
|
# |
# The config read is done in this way to support the read of |
# The config read is done in this way to support the read of |
# the non-default configuration file in the |
# the non-default configuration file in the |
# event we are being used outside of loncapa. |
# event we are being used outside of loncapa. |
Line 176 sub new {
|
Line 183 sub new {
|
# LoncapaHim fields of the object respectively. |
# LoncapaHim fields of the object respectively. |
# |
# |
if (!exists $hostshash{$Hostname}) { |
if (!exists $hostshash{$Hostname}) { |
|
&Debug(8, "No Such host $Hostname"); |
return undef; # No such host!!! |
return undef; # No such host!!! |
} |
} |
my @ConfigLine = @{$hostshash{$Hostname}}; |
my @ConfigLine = @{$hostshash{$Hostname}}; |
Line 797 sub read_hosts {
|
Line 805 sub read_hosts {
|
my $Filename = shift; |
my $Filename = shift; |
my %HostsTab; |
my %HostsTab; |
|
|
open(CONFIG,'<'.$Filename) or die("Can't read $Filename"); |
open(CONFIG,'<'.$Filename) or die("Can't read $Filename"); |
while (my $line = <CONFIG>) { |
while (my $line = <CONFIG>) { |
if (!($line =~ /^\s*\#/)) { |
if (!($line =~ /^\s*\#/)) { |
my @items = split(/:/, $line); |
my @items = split(/:/, $line); |