Menu

#238 NiceSlice affects code where it should not

feature_request
closed-fixed
other (94)
4
2022-04-14
2010-06-20
punkish
No

I got the following 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>

I was creating several tables where $table would be filled in before executing the statement, but NiceSlice's source filter changed the code causing the error. The error goes away if I precede the above code with

no PDL::NiceSlice

The solution is well-documented, but given that I have several different fragments of code that both use NiceSlice and get adversely affected by it, to me NiceSlice doesn't seem worth the trouble. I have to learn a syntax no matter what -- I may as well learn the regular slicing syntax instead of tinkering with NiceSlice, as my program is now littered with pairs of 'no PDL::NiceSlice/use PDL::NiceSlice'.

My env.

Mac OS X 10.6.4
perl 5.12.1
PDL 2.4.6

Discussion

<< < 1 2 3 (Page 3 of 3)
  • Chris Marshall

    Chris Marshall - 2015-03-15

    Lower priority to 4. This will be addressed during the PDL-2.009 release cycle.

     
  • mohawk

    mohawk - 2018-04-09

    This matter will now be tracked at https://github.com/PDLPorters/pdl/issues/25

     
  • mohawk

    mohawk - 2022-04-14
    • status: open-remind --> closed-fixed
     
<< < 1 2 3 (Page 3 of 3)

Log in to post a comment.