Cliff -

Now I'm looking at the perldl docs, so I have some better ideas. :-)

First, the module to disable is PDL::NiceSlice. Saying "no
PDL::NiceSlice" in a Perl *script* would disable NiceSlice until you
"use" it again. However, saying "no PDL::NiceSlice" does not turn off
the filter in perldl. (That's a bit odd, in my opinion; the shell
should look out for such commands and flip internal flags when it sees
something like "no PDL::NiceSlice", but alas it does not.) Instead you
need to say "notrans". So, a working example would look like this:

pdl> use DBI
pdl> $dbh = DBI->connect("dbi:CSV:", "", "", {f_dir => "."})
pdl> notrans     # turn NiceSlice off
pdl> $table = "FwdGain"
pdl> $dbh->do("CREATE TABLE $table (id INTEGER, name CHAR (10),
fwdGain INTEGER)")
pdl> trans    # turn NiceSlice back on

An alternative is to avoid the syntactic issue that trips the source
filter by using the baby cart operator** like so:

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)")

As for the improved source filter, Chris has worked on it and I
thought it made it into 2.4.10 based on this email:
http://mailman.jach.hawaii.edu/pipermail/perldl/2012-February/006359.html.
But, maybe this improvement only works with the source filter version
(and therefore only for scripts), or perhaps you need to switch on the
newer filter. I can't recall and a quick check of the code didn't make
it obvious.

David

** See 
https://github.com/book/perlsecret/blob/master/lib/perlsecret.pod#baby-cart--

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to