# History
# (1) Created, pulled out of www-spong program (Ed 07-28-97)
#
-# $Id: www-spong-ack.pl,v 1.10 2003/01/29 23:01:51 sljohnson Exp $
+# $Id: www-spong-ack.pl,v 1.11 2003/07/27 02:53:20 sljohnson Exp $
use lib "@@LIBDIR@@";
use Time::Local;
use Spong::Host;
+use List::Compare;
+
# Load our configuration variables, including the user specified configuration
# information (spong.conf, spong.hosts, and spong.groups files).
eval $evalme || die "Invalid spong.hosts file: $@";
# Fallback, if we didn't read things correctly...
+ my $lc = List::Compare->new( \@HOSTS_LIST, \@{[keys %HOSTS]} );
+ if( ! $lc->is_LequivalentR ) { @HOSTS_LIST = sort keys %HOSTS; }
- if( sort ( @HOSTS_LIST ) != sort ( keys %HOSTS ) ) {
- @HOSTS_LIST = sort keys %HOSTS; }
# Do the same thing for the groups file.
close( GROUPS );
eval $evalme || die "Invalid spong.groups file: $@";
- if( sort ( @GROUPS_LIST ) != sort ( keys %GROUPS ) ) {
- @GROUPS_LIST = sort keys %GROUPS; }
+ $lc = List::Compare->new( \@GROUPS_LIST, \@{[keys %GROUPS]} );
+ if( ! $lc->is_LequivalentR ) { @GROUPS_LIST = sort keys %GROUPS; }
}