[interchange-cvs] interchange - jon modified lib/Vend/Util.pm
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Fri Jan 24 00:00:01 2003
User: jon
Date: 2003-01-24 04:59:36 GMT
Modified: lib/Vend Tag: STABLE_4_8-branch Util.pm
Log:
Merge from trunk:
* Fix bug where bad [nitems compare=...] could cause server error. Now
just silently causes bad compare -- perhaps I should add logging?
Revision Changes Path
No revision
No revision
2.1.2.12 +6 -5 interchange/lib/Vend/Util.pm
rev 2.1.2.12, prev_rev 2.1.2.11
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.1.2.11
retrieving revision 2.1.2.12
diff -u -u -r2.1.2.11 -r2.1.2.12
--- Util.pm 26 Nov 2002 03:21:10 -0000 2.1.2.11
+++ Util.pm 24 Jan 2003 04:59:36 -0000 2.1.2.12
@@ -1,6 +1,6 @@
# Vend::Util - Interchange utility functions
#
-# $Id: Util.pm,v 2.1.2.11 2002/11/26 03:21:10 jon Exp $
+# $Id: Util.pm,v 2.1.2.12 2003/01/24 04:59:36 jon Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. and
# Interchange Development Group, http://www.icdevgroup.org/
@@ -75,7 +75,7 @@
use Errno;
use subs qw(logError logGlobal);
use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.1.2.11 $, 10);
+$VERSION = substr(q$Revision: 2.1.2.12 $, 10);
BEGIN {
eval {
@@ -1283,9 +1283,10 @@
if($opt->{qualifier}) {
$attr = $opt->{qualifier};
my $qr;
- $qr = qr{$opt->{compare}}
- if $opt->{compare};
- if($opt->{compare}) {
+ eval {
+ $qr = qr{$opt->{compare}} if $opt->{compare};
+ };
+ if($qr) {
$sub = sub {
$_[0] =~ $qr;
};