Return-Path: Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: (qmail 80199 invoked from network); 14 Sep 2003 00:29:40 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Sep 2003 00:29:40 -0000 Received: (qmail 18104 invoked by uid 500); 14 Sep 2003 00:29:23 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 18085 invoked by uid 500); 14 Sep 2003 00:29:23 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 18072 invoked from network); 14 Sep 2003 00:29:22 -0000 Received: from unknown (HELO rsmba.biz) (4.41.130.89) by daedalus.apache.org with SMTP; 14 Sep 2003 00:29:22 -0000 Received: (qmail 58199 invoked from network); 14 Sep 2003 00:28:06 -0000 Received: from localhost (HELO foghorn.rsmba.biz) (127.0.0.1) by localhost with SMTP; 14 Sep 2003 00:28:06 -0000 Date: Sat, 13 Sep 2003 17:28:05 -0700 From: Richard Schilling To: embperl@perl.apache.org Subject: A TABLE-processing-with-[$ while $]-blocks-involved question Message-ID: <20030914002805.GA58177@foghorn.rsmba.biz> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer: Balsa 1.4.4 Lines: 50 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Just got done debugging an application that used the following form: [$ while @contractinfo=$rsmbacontracts->fetchrow $]
Contract ID Start Timestamp End Timestamp Minimum Hours Quoted Maximum Hours Quoted Minimum Fees Quoted Maximum Fees Quoted Status
[+ $contractinfo[0] +] [+ $contractinfo[2] +] [+ $contractinfo[3] +] [+ $contractinfo[4] +] [+ $contractinfo[6] +] [+ $contractinfo[5] +] [+ $contractinfo[7] +] [+ $contractinfo[8] +]
[$ endwhile $] The postgres log reported the following for the rsmbacontracts query: LOG: query: SELECT * FROM clientcontracts WHERE accountguid = 'b6ea9cafe2d1997392d166b96e5697b1'; LOG: pq_recvbuf: unexpected EOF on client connection ======= I tried and tried to figure out what was wrong, and then it hit me: the [$ endwhile $] command needs to appear *before* the tag. So, what happened? I suspect it has to do with Embperl table processing, but am curious about the internals. Richard Schilling rsmba.biz --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org