[interchange-cvs] interchange - racke modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Thu Feb 15 10:13:59 EST 2007
User: racke
Date: 2007-02-15 15:13:59 GMT
Modified: . WHATSNEW-5.5
Modified: lib/Vend Interpolate.pm
Log:
Fix [on-match]/[no-match] for loop lists without matchlimit generated from
embedded Perl objects
Revision Changes Path
1.29 +3 -0 interchange/WHATSNEW-5.5
rev 1.29, prev_rev 1.28
Index: WHATSNEW-5.5
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.5,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- WHATSNEW-5.5 31 Jan 2007 00:26:51 -0000 1.28
+++ WHATSNEW-5.5 15 Feb 2007 15:13:59 -0000 1.29
@@ -51,6 +51,9 @@
* Vend::SQL_Parser required LIMIT clause to be lowercase when it should be
case-insensitive
+* Fix [on-match]/[no-match] for loop lists without matchlimit generated from
+ embedded Perl objects
+
UserDB
------
2.277 +11 -5 interchange/lib/Vend/Interpolate.pm
rev 2.277, prev_rev 2.276
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.276
retrieving revision 2.277
diff -u -r2.276 -r2.277
--- Interpolate.pm 8 Aug 2006 07:20:42 -0000 2.276
+++ Interpolate.pm 15 Feb 2007 15:13:59 -0000 2.277
@@ -1,8 +1,8 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.276 2006/08/08 07:20:42 kwalsh Exp $
+# $Id: Interpolate.pm,v 2.277 2007/02/15 15:13:59 racke Exp $
#
-# Copyright (C) 2002-2006 Interchange Development Group
+# Copyright (C) 2002-2007 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
#
# This program was originally based on Vend 0.2 and 0.3
@@ -28,7 +28,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.276 $, 10);
+$VERSION = substr(q$Revision: 2.277 $, 10);
@EXPORT = qw (
@@ -4728,8 +4728,14 @@
## about passing embedded Perl objects to a list
# Can pass object.mv_results=$ary object.mv_field_names=$ary
- return region($opt, $text) if $opt->{object};
-
+ if ($opt->{object}) {
+ my $obj = $opt->{object};
+ # ensure that number of matches is always set
+ # so [on-match] / [no-match] works
+ $obj->{matches} = scalar(@{$obj->{mv_results}});
+ return region($opt, $text);
+ }
+
# Here we can take the direct results of an op like
# @set = $db->query() && return \@set;
# Called with
More information about the interchange-cvs
mailing list