#232 perl -d chokes on lvalue functions

critical
open-remind
nobody
core (120)
1
2013-01-11
2010-05-02
Chad A. Davis
No

This works as expected
cat > perldl-lvalue.pl
#!/usr/bin/env perl
use strict;
use PDL;
print identity 1
^D
perl perldl-lvalue.pl

But this does not:

perl -d perldl-lvalue.pl

Can't return a temporary from lvalue subroutine at /usr/lib/perl5/PDL/MatrixOps.pm line 169.
at /usr/lib/perl5/PDL/MatrixOps.pm line 169
PDL::MatrixOps::identity(1) called at /home/davis/tmp/perldl-lvalue.pl line 5

I.e. PDL lvalue functions, not just this one, seem to fail under the Perl debugger.

I tried this on the PDL (2.4.5) included in my Ubuntu 10.04 (i686) and also built 2.4.6 and 2.4.6_001 from CPAN.

Discussion

<< < 1 2 3 (Page 3 of 3)
  • Chris Marshall
    Chris Marshall
    2013-01-02

    Bumping priority to medium as I think this could be resolved for the next PDL release.

     
  • Chris Marshall
    Chris Marshall
    2013-01-02

    • priority: 1 --> 5
     
  • Chris Marshall
    Chris Marshall
    2013-01-11

    The only solution that works for all perl versions is
    to use the idiom:

    ($tmp = $a->slice(...)) .= stuff

    which is ugly but functional. Switching
    to perl 5.16.x also resolves the problem.
    I'm lowering this priority since you can
    get things to work in the debugger. I would
    like to keep the ticket open as I think
    a perl source filter automatic work-around
    may be possible.

     
  • Chris Marshall
    Chris Marshall
    2013-01-11

    • priority: 5 --> 1
     
<< < 1 2 3 (Page 3 of 3)