[interchange-cvs] interchange - jon modified 2 files
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Thu Dec 6 16:15:00 2001
User: jon
Date: 2001-12-06 21:14:07 GMT
Modified: lib/Vend/Table Common.pm InMemory.pm
Log:
Make sure each_nokey always returns an arrayref.
Mike, you'll have to correct me if you have a better way in mind of
dealing with this.
Revision Changes Path
2.6 +3 -3 interchange/lib/Vend/Table/Common.pm
rev 2.6, prev_rev 2.5
Index: Common.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Common.pm,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -u -r2.5 -r2.6
--- Common.pm 2001/11/26 18:34:02 2.5
+++ Common.pm 2001/12/06 21:14:07 2.6
@@ -1,6 +1,6 @@
# Vend::Table::Common - Common access methods for Interchange databases
#
-# $Id: Common.pm,v 2.5 2001/11/26 18:34:02 mheins Exp $
+# $Id: Common.pm,v 2.6 2001/12/06 21:14:07 jon Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -22,7 +22,7 @@
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA.
-$VERSION = substr(q$Revision: 2.5 $, 10);
+$VERSION = substr(q$Revision: 2.6 $, 10);
use strict;
package Vend::Table::Common;
@@ -578,7 +578,7 @@
#::logDebug("each_nokey: $key field=$rfield sup=$sup");
if(! defined $key) {
undef $restrict;
- return ();
+ return [];
}
$key =~ s/^k// or next;
if($restrict) {
2.2 +3 -3 interchange/lib/Vend/Table/InMemory.pm
rev 2.2, prev_rev 2.1
Index: InMemory.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/InMemory.pm,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -u -r2.1 -r2.2
--- InMemory.pm 2001/11/26 18:34:02 2.1
+++ InMemory.pm 2001/12/06 21:14:07 2.2
@@ -1,6 +1,6 @@
# Vend::Table::InMemory - Store an Interchange table in memory
#
-# $Id: InMemory.pm,v 2.1 2001/11/26 18:34:02 mheins Exp $
+# $Id: InMemory.pm,v 2.2 2001/12/06 21:14:07 jon 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.1 $, 10);
+$VERSION = substr(q$Revision: 2.2 $, 10);
use strict;
# 0: column names
@@ -170,7 +170,7 @@
for (;;) {
$key = each %{$s->[$TIE_HASH]};
- return () unless defined $key;
+ return [] unless defined $key;
return [ $s->row($key) ];
}
}