[sf-perl] Perl's to_date() equivalent

Loo, Peter # PHX Peter.Loo at source.wolterskluwer.com
Fri Sep 1 15:55:30 PDT 2006

That is a wonderful idea Ian.  No I did not use strict this time.  I
will change my code to $sth->bind_columns.

-----Original Message-----
From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org
[mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or
g] On Behalf Of spidaman at arachna.com
Sent: Friday, September 01, 2006 3:51 PM
To: San Francisco Perl Mongers User Group
Subject: Re: [sf-perl] Perl's to_date() equivalent

On Fri, 1 Sep 2006, Loo, Peter # PHX wrote:
>   while ( @cur = $sth->fetchrow() ) {

I think this is a 'DBI best practices' niggling detail.

IIRC, this does a lot of copying, better to define the variables you
want ("define" meaning use "my" ... you do 'use strict', don't you?) and
bind the references with $sth->bind_columns(...). Particularly if you
iterating over a big assed cursor.

Ian Kallen <spidaman _at_ arachna _dot_ com> | Yahoo/AIM: iankallen

SanFrancisco-pm mailing list
SanFrancisco-pm at pm.org

This E-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by reply E-mail, and
destroy all copies of the original message.

More information about the SanFrancisco-pm mailing list