[interchange-cvs] interchange - jon modified lib/Vend/UserDB.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Tue Sep 18 18:01:00 2001


User:      jon
Date:      2001-09-18 21:59:22 GMT
Modified:  lib/Vend UserDB.pm
Log:
Scrutinize passed-in option parameters more closely.

Revision  Changes    Path
2.2       +7 -4      interchange/lib/Vend/UserDB.pm


rev 2.2, prev_rev 2.1
Index: UserDB.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/UserDB.pm,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -u -r2.1 -r2.2
--- UserDB.pm	2001/08/17 22:30:56	2.1
+++ UserDB.pm	2001/09/18 21:59:22	2.2
@@ -1,6 +1,6 @@
 # Vend::UserDB - Interchange user database functions
 #
-# $Id: UserDB.pm,v 2.1 2001/08/17 22:30:56 heins Exp $
+# $Id: UserDB.pm,v 2.2 2001/09/18 21:59:22 jon Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -16,7 +16,7 @@
 
 package Vend::UserDB;
 
-$VERSION = substr(q$Revision: 2.1 $, 10);
+$VERSION = substr(q$Revision: 2.2 $, 10);
 
 use vars qw!
 	$VERSION
@@ -1477,11 +1477,14 @@
 
 #::logDebug("Called userdb function=$function opt=$opt " .  Data::Dumper::Dumper($opt));
 
-	if(ref $opt) {
+	if(ref $opt eq 'HASH') {
 		%options = %$opt;
 	}
-	else {
+	elsif (! ref $opt) {
 		%options = ($opt, @_);
+	}
+	else {
+		%options = @_;
 	}
 
 	my $status = 1;