On Sat, Jun 19, 2010 at 10:16 PM, Chris Marshall <[email protected]> wrote:
> On 6/19/2010 6:19 PM, P Kishor wrote:
>>
>> I got the following funky error
>>
>> DBD::Pg::st execute failed: ERROR:  syntax error at or near "->"
>> LINE 2:             CREATE TABLE test.foo ->nslice(CHECK(yr=...
>>                                                   ^ at build_db.pl line
>> 452.
>>
>> The offending line in my script is
>>
>> 451>
>> 452>  $sth = $dbh->prepare(qq{
>> 453>      CREATE TABLE $table (
>> 454>          CHECK ( yr = $yr )
>> 455>      ) INHERITS ($schema.master_table)
>> 456>  });
>> 457>
>>
>> Seems like PDL::NiceSlice is polluting the namespace and interfering
>> where it shouldn't. Adding 'no PDL::NiceSlice;' before the code, and
>> then toggling it back with 'use PDL::NiceSlice;' after the code does
>> the trick, but, to me, this reeks of danger. Shouldn't nslice only
>> work its magic when explicitly called? Otherwise, shouldn't it stay
>> out of the way?
>
> PDL::NiceSlice is not polluting the namespace.  It is warping
> things from an external dimension.  That is the problem with
> source filters.

Yes, technically, you are correct. And the way you put it, "warping
things from an external dimension," is a lot of exciting sounding than
"polluting the namespace." Nevertheless, the end effect is, NiceSlice
is butting in when and where I don't want it to... unintentionally.

>
> The good news, is you can turn off NiceSlice temporarily, or
> just not use it.  See 'help slice' for syntax to use without
> NiceSlice.
>

Yes, as I mentioned, 'no PDL::NiceSlice' before the line of code in
question helped me on my way. Fortunately, my program was only a few
hundred lines of a single file, else I could have been in bigger
trouble.

> I would also recommend submitting a bug report to sf.net.  It
> is possible that the source filter can be improved not to give
> a false positive for your example.

Will do so. Many thanks.


>
> Regards,
> Chris
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================

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

Reply via email to