[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Tue Jul 9 11:18:00 2002
User: heins
Date: 2002-07-09 15:17:05 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Update $Db{table} and $Sql{table} if table closed/reopened in transaction=
mode
* Make creation of $Sql{table} more sensible, remove two tests
Revision Changes Path
2.83 +8 -7 interchange/lib/Vend/Interpolate.pm
rev 2.83, prev_rev 2.82
Index: Interpolate.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.82
retrieving revision 2.83
diff -u -r2.82 -r2.83
--- Interpolate.pm 7 Jul 2002 04:02:27 -0000 2.82
+++ Interpolate.pm 9 Jul 2002 15:17:05 -0000 2.83
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#=20
-# $Id: Interpolate.pm,v 2.82 2002/07/07 04:02:27 mheins Exp $
+# $Id: Interpolate.pm,v 2.83 2002/07/09 15:17:05 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA =3D qw(Exporter);
=20
-$VERSION =3D substr(q$Revision: 2.82 $, 10);
+$VERSION =3D substr(q$Revision: 2.83 $, 10);
=20
@EXPORT =3D qw (
=20
@@ -2056,10 +2056,8 @@
next unless $db;
$db =3D $db->ref();
if($hole) {
- $Sql{$tab} =3D $hole->wrap($db->[$Vend::Table::DBI::DBI])
- if $db =3D~ /::DBI/;
- $Sql{$tab} =3D $hole->wrap($db->[$Vend::Table::LDAP::TIE_HASH])
- if $db =3D~ /::LDAP/;
+ $Sql{$tab} =3D $hole->wrap($db->dbh())
+ if $db->can('dbh');
$Db{$tab} =3D $hole->wrap($db);
}
else {
@@ -2225,7 +2223,6 @@
foreach $dbname (@args) {
# Handle table:column:key
$dbname =3D~ s/:.*//;
-#::logDebug("flag transactions $dbname=3D$value");
$Vend::TransactionDatabase{$dbname} =3D $value;
$Vend::WriteDatabase{$dbname} =3D $value;
=20
@@ -2242,6 +2239,9 @@
$db =3D database_exists_ref($dbname);
$db =3D $db->ref();
}
+ $Db{$dbname} =3D $db;
+ $Sql{$dbname} =3D $db->dbh()
+ if $db->can('dbh');
}
}
elsif($flag eq 'commit' || $flag eq 'rollback') {
@@ -6676,6 +6676,7 @@
currency =3D> currency($cost),
group =3D> $group,
label =3D> $l->{label} || $desc,
+ part_number =3D> $l->{part_number},
description =3D> $desc,
};
if($cost =3D=3D 0) {