[interchange-cvs] interchange - heins modified lib/Vend/Table/InMemory.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Mon Jan 7 23:40:00 2002
User: heins
Date: 2002-01-08 04:39:52 GMT
Modified: lib/Vend/Table Tag: STABLE_4_8-branch InMemory.pm
Log:
* Return undef on not-found row_hash (all other modules do that).
Revision Changes Path
No revision
No revision
2.0.2.1 +4 -4 interchange/lib/Vend/Table/InMemory.pm
rev 2.0.2.1, prev_rev 2.0
Index: InMemory.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Table/InMemory.pm,v
retrieving revision 2.0
retrieving revision 2.0.2.1
diff -u -r2.0 -r2.0.2.1
--- InMemory.pm 2001/07/18 02:23:20 2.0
+++ InMemory.pm 2002/01/08 04:39:52 2.0.2.1
@@ -1,6 +1,6 @@
# Vend::Table::InMemory - Store an Interchange table in memory
#
-# $Id: InMemory.pm,v 2.0 2001/07/18 02:23:20 jon Exp $
+# $Id: InMemory.pm,v 2.0.2.1 2002/01/08 04:39:52 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.0 $, 10);
+$VERSION = substr(q$Revision: 2.0.2.1 $, 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;