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

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Fri Feb 1 12:06:03 2002


User:      jon
Date:      2002-02-01 17:03:38 GMT
Modified:  lib/Vend Util.pm
Log:
Simplify is_yes and is_no.

We've got problems if arrays in Interchange ever start from
something other than 0 ...

Revision  Changes    Path
2.18      +4 -4      interchange/lib/Vend/Util.pm


rev 2.18, prev_rev 2.17
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -u -r2.17 -r2.18
--- Util.pm	31 Jan 2002 18:04:35 -0000	2.17
+++ Util.pm	1 Feb 2002 17:03:38 -0000	2.18
@@ -1,6 +1,6 @@
 # Vend::Util - Interchange utility functions
 #
-# $Id: Util.pm,v 2.17 2002/01/31 18:04:35 mheins Exp $
+# $Id: Util.pm,v 2.18 2002/02/01 17:03:38 jon Exp $
 # 
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -81,7 +81,7 @@
 use Safe;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.17 $, 10);
+$VERSION = substr(q$Revision: 2.18 $, 10);
 
 BEGIN {
 	eval {
@@ -1151,11 +1151,11 @@
 }
 
 sub is_yes {
-    return( defined($_[$[]) && ($_[$[] =~ /^[yYtT1]/));
+    return( defined($_[0]) && ($_[0] =~ /^[yYtT1]/));
 }
 
 sub is_no {
-	return( !defined($_[$[]) || ($_[$[] =~ /^[nNfF0]/));
+	return( !defined($_[0]) || ($_[0] =~ /^[nNfF0]/));
 }
 
 # Returns a URL which will run the ordering system again.  Each URL