#238 NiceSlice affects code where it should not

feature_request
open-remind
other (94)
4
2015-03-15
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 2 of 3)
  • Chris Marshall

    Chris Marshall - 2011-12-09
    • status: pending-fixed --> open
     
  • Chris Marshall

    Chris Marshall - 2011-12-09

    Re-opening ticket since I don't consider the problem solved util
    the fixed NiceSlice works in scripts and in the interactive shells.

     
  • Chris Marshall

    Chris Marshall - 2013-01-02
    • priority: 3 --> 7
     
  • Chris Marshall

    Chris Marshall - 2013-01-02

    Bumping the priority as this fix is long overdue...

     
  • Chris Marshall

    Chris Marshall - 2013-02-05

    Bug fixed in Git.
    Thanks for reporting the problem!

     
  • Chris Marshall

    Chris Marshall - 2013-02-05

    The improved PDL::NiceSlice with the Filter::Simple
    engine is in the CHM/PDL-2.4.11_008.tar.gz CPAN
    developers release and should be available in the
    next official PDL relesae.

     
  • Chris Marshall

    Chris Marshall - 2013-02-05
    • status: open --> pending-fixed
     
  • Chris Marshall

    Chris Marshall - 2013-03-24
    • status: pending-fixed --> open-remind
     
  • mohawk

    mohawk - 2015-02-23

    Seems like this is done. Close?

     
  • Chris Marshall

    Chris Marshall - 2015-03-15
    • Priority: 7 --> 4
     
<< < 1 2 3 > >> (Page 2 of 3)

Log in to post a comment.