[interchange-cvs] interchange - heins modified lib/Vend/Table/InMemory.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Mon Jan 7 23:39:00 2002


User:      heins
Date:      2002-01-08 04:38:58 GMT
Modified:  lib/Vend/Table InMemory.pm
Log:
	* Remove die on not-found row_hash (all other modules return undef).

Revision  Changes    Path
2.4       +4 -4      interchange/lib/Vend/Table/InMemory.pm


rev 2.4, prev_rev 2.3
Index: InMemory.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Table/InMemory.pm,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -r2.3 -r2.4
--- InMemory.pm	2001/12/07 00:20:28	2.3
+++ InMemory.pm	2002/01/08 04:38:58	2.4
@@ -1,6 +1,6 @@
 # Vend::Table::InMemory - Store an Interchange table in memory
 #
-# $Id: InMemory.pm,v 2.3 2001/12/07 00:20:28 jon Exp $
+# $Id: InMemory.pm,v 2.4 2002/01/08 04:38:58 mheins Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -25,7 +25,7 @@
 package Vend::Table::InMemory;
 use Vend::Table::Common;
 @ISA = qw/Vend::Table::Common/;
-$VERSION = substr(q$Revision: 2.3 $, 10);
+$VERSION = substr(q$Revision: 2.4 $, 10);
 use strict;
 
 # 0: column names
@@ -108,9 +108,9 @@
 
 sub row_hash {
 	my ($s, $key) = @_;
-	my $a = $s->[$TIE_HASH]{$key};
+	my $a = $s->[$TIE_HASH]{$key}
+		or return undef;
 #::logDebug("here is row $key: " . ::uneval($a));
-	die "There is no row with index '$key'" unless defined $a;
 	my %row;
 	@row{ @{$s->[$COLUMN_NAMES]} } = @$a;
 	return \%row;