I believe this is a PDL tracker bug: "NiceSlice affects code where it should not" - ID: 3018731 http://sourceforge.net/tracker/?func=detail&aid=3018731&group_id=612&atid=100612
As David mentioned, work has been done on a new PDL::NiceSlice engine with better source filtering---i.e., it doesn't convert PDL::NiceSlice constructs within strings or comments. However, the first version of this only is available for perl program files. I hope to have the pdl2 and perldl support up for the PDL-2.4.12 release this Fall. In the meantime, see the perldl docs for controlling the filter there. I don't think pdl2 has such support at the moment. --Chris On Thu, Aug 16, 2012 at 6:09 PM, Tim Haines <[email protected]> wrote: > Hi, Cliff. > > It looks like NiceSlice (pdl2 use's this by default) is mangling your call > to DBI::do. The easiest thing to do is turn off NiceSlice. > > pdl> no NiceSlice; > pdl> use DBI > pdl> $dbh=DBI->connect("dbi:CSV:", "","",{f_dir=>"."}) > pdl> $table="FwdGain" > pdl> $dbh->do ("CREATE TABLE $table (id INTEGER, name CHAR (10), fwdGain > INTEGER)") > > > You can turn it back on with 'use NiceSlice;' if you need it later in the > same session. > > Hope that helps. > > - Tim > > >> ---------- Forwarded message ---------- >> From: Clifford Sobchuk <[email protected]> >> To: "[email protected]" <[email protected]> >> Cc: >> Date: Thu, 16 Aug 2012 14:06:47 -0400 >> Subject: [Perldl] DBI and pdl2 >> Hi folks, wondering if anyone has ever tried using DBI in the pdl2 shell. >> I am using PDL 2.4.10 on win32. >> >> pdl> use DBI >> pdl> $dbh=DBI->connect("dbi:CSV:", "","",{f_dir=>"."}) >> pdl> $table="FwdGain" >> pdl> $dbh->do ("CREATE TABLE $table (id INTEGER, name CHAR (10), fwdGain >> INTEGER)") >> Can't find column definitions! at >> C:\strawberry\perl\site\lib/SQL/Statement.pm line 88. >> DBD::CSV::db do failed: Can't find column definitions! [for Statement >> "CREATE TABLE FwdGain ->nslice(idINTEGER,nameCHAR(10),fwdGainI >> NTEGER)"] at (eval 434) line 5, <IN> line 5. >> >> Any thoughts. Thanks, >> >> CLIFF SOBCHUK >> Ericsson >> Core RF Engineering >> Calgary, AB, Canada >> Phone 613-667-1974 ECN 8109 x71974 >> Mobile 403-819-9233 >> [email protected] >> yahoo: sobchuk >> http://www.ericsson.com/ >> >> “The author works for Telefonaktiebolaget L M Ericsson (“Ericsson”), who >> is solely responsible for this email and its contents. All inquiries >> regarding this email should be addressed to Ericsson. The web site for >> Ericsson is www.ericsson.com.” >> >> This Communication is Confidential. We only send and receive email on the >> basis of the terms set out at www.ericsson.com/email_disclaimer >> >> > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
