[interchange-cvs] interchange - markj modified 4 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Mon May 26 02:30:04 UTC 2008


User:      markj
Date:      2008-05-26 02:30:04 GMT
Modified:  lib/Vend/Table Common.pm DBI_CompositeKey.pm LDAP.pm
Modified:           Shadow.pm
Log:
* Making set_slice() reliably accept the field/value pairs as simple args
  across all polymorphs, consistent with regression fix from RT#200.

Revision  Changes    Path
2.51                 interchange/lib/Vend/Table/Common.pm


rev 2.51, prev_rev 2.50
Index: Common.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Common.pm,v
retrieving revision 2.50
retrieving revision 2.51
diff -u -r2.50 -r2.51
--- Common.pm	6 May 2008 20:42:59 -0000	2.50
+++ Common.pm	26 May 2008 02:30:04 -0000	2.51
@@ -1,6 +1,6 @@
 # Vend::Table::Common - Common access methods for Interchange databases
 #
-# $Id: Common.pm,v 2.50 2008-05-06 20:42:59 markj Exp $
+# $Id: Common.pm,v 2.51 2008-05-26 02:30:04 markj Exp $
 #
 # Copyright (C) 2002-2008 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -23,7 +23,7 @@
 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 # MA  02110-1301  USA.
 
-$VERSION = substr(q$Revision: 2.50 $, 10);
+$VERSION = substr(q$Revision: 2.51 $, 10);
 use strict;
 
 package Vend::Table::Common;
@@ -416,6 +416,9 @@
 
 	if(ref $fary ne 'ARRAY') {
 		my $href = $fary;
+		if(ref $href ne 'HASH') {
+			$href = { splice (@_, 2) };
+		}
 		$vary = [ values %$href ];
 		$fary = [ keys   %$href ];
 	}



1.15                 interchange/lib/Vend/Table/DBI_CompositeKey.pm


rev 1.15, prev_rev 1.14
Index: DBI_CompositeKey.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/DBI_CompositeKey.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- DBI_CompositeKey.pm	18 May 2008 02:50:21 -0000	1.14
+++ DBI_CompositeKey.pm	26 May 2008 02:30:04 -0000	1.15
@@ -1,6 +1,6 @@
 # Vend::Table::DBI - Access a table stored in an DBI/DBD database
 #
-# $Id: DBI_CompositeKey.pm,v 1.14 2008-05-18 02:50:21 jon Exp $
+# $Id: DBI_CompositeKey.pm,v 1.15 2008-05-26 02:30:04 markj Exp $
 #
 # Copyright (C) 2002-2008 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -21,7 +21,7 @@
 # MA  02110-1301  USA.
 
 package Vend::Table::DBI_CompositeKey;
-$VERSION = substr(q$Revision: 1.14 $, 10);
+$VERSION = substr(q$Revision: 1.15 $, 10);
 
 use strict;
 
@@ -340,21 +340,27 @@
 		$fary = [@$fin];
 		$vary = [@$vin];
 	}
-	elsif (ref $fin eq 'HASH') {
-		my $href = { %$fin };
-
-		if(! $key) {
-			@key = ();
-			for( @{$s->[$CONFIG]{_Key_columns}} ) {
-				push @key, delete $href->{$_};
-			}
-			$key = \@key;
-			$exists = $s->record_exists(\@key);
+ 	else {
+		my $href = $fin;
+		if(ref $href eq 'HASH') {
+			$href = { %$href };
 		}
-
+		else {
+			$href = { splice (@_, 2) };
+		}
+ 
+ 		if(! $key) {
+ 			@key = ();
+ 			for( @{$s->[$CONFIG]{_Key_columns}} ) {
+				push @key, delete $href->{$_};
+ 			}
+ 			$key = \@key;
+ 			$exists = $s->record_exists(\@key);
+ 		}
+ 
 		$vary = [ values %$href ];
 		$fary = [ keys   %$href ];
-	}
+ 	}
 
 	if(! $key) {
 		for my $kp (@{$s->[$CONFIG]{_Key_columns}}) {



2.17                 interchange/lib/Vend/Table/LDAP.pm


rev 2.17, prev_rev 2.16
Index: LDAP.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/LDAP.pm,v
retrieving revision 2.16
retrieving revision 2.17
diff -u -r2.16 -r2.17
--- LDAP.pm	5 May 2008 15:14:00 -0000	2.16
+++ LDAP.pm	26 May 2008 02:30:04 -0000	2.17
@@ -1,6 +1,6 @@
 # Vend::Table::LDAP - Interchange LDAP pseudo-table access
 #
-# $Id: LDAP.pm,v 2.16 2008-05-05 15:14:00 markj Exp $
+# $Id: LDAP.pm,v 2.17 2008-05-26 02:30:04 markj Exp $
 #
 # Copyright (C) 2002-2007 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -25,7 +25,7 @@
 
 package Vend::Table::LDAP;
 @ISA = qw/Vend::Table::Common/;
-$VERSION = substr(q$Revision: 2.16 $, 10);
+$VERSION = substr(q$Revision: 2.17 $, 10);
 use strict;
 
 use vars qw(
@@ -311,6 +311,15 @@
 	$opt->{dml} = 'upsert'
 		unless defined $opt->{dml};
 
+	if(ref $fary ne 'ARRAY') {
+		my $href = $fary;
+		if(ref $href ne 'HASH') {
+			$href = { splice (@_, 2) };
+		}
+		$vary = [ values %$href ];
+		$fary = [ keys   %$href ];
+	}
+
 	if ($s->record_exists($key)) {
 		if ($opt->{dml} eq 'insert') {
 			$s->log_error(



1.54                 interchange/lib/Vend/Table/Shadow.pm


rev 1.54, prev_rev 1.53
Index: Shadow.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Shadow.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- Shadow.pm	30 Mar 2007 11:39:54 -0000	1.53
+++ Shadow.pm	26 May 2008 02:30:04 -0000	1.54
@@ -1,6 +1,6 @@
 # Vend::Table::Shadow - Access a virtual "Shadow" table
 #
-# $Id: Shadow.pm,v 1.53 2007-03-30 11:39:54 pajamian Exp $
+# $Id: Shadow.pm,v 1.54 2008-05-26 02:30:04 markj Exp $
 #
 # Copyright (C) 2002-2006 Stefan Hornburg (Racke) <racke at linuxia.de>
 #
@@ -20,7 +20,7 @@
 # MA  02110-1301  USA.
 
 package Vend::Table::Shadow;
-$VERSION = substr(q$Revision: 1.53 $, 10);
+$VERSION = substr(q$Revision: 1.54 $, 10);
 
 # CREDITS
 #
@@ -186,10 +186,10 @@
 }
 
 sub set_slice {
-	my ($s, $key, $fary, $vary) = @_;
+	my $s = shift;
 
 	$s = $s->import_db() if ! defined $s->[$OBJ];
-	$s->[$OBJ]->set_slice($key, $fary, $vary);
+	$s->[$OBJ]->set_slice(@_);
 }
 	
 sub set_row {







More information about the interchange-cvs mailing list