Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#232 perl -d chokes on lvalue functions

feature_request
closed-wont-fix
core (120)
1
2015-02-24
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 (Page 2 of 2)
  • Chris Marshall
    Chris Marshall
    2015-02-22

    This bug is fixed for perl versions greater than 5.16.0 which includes the current Strawberry Perl, ActiveState Perl Community Edition, and Citrus Perl. I'm changing this to a Feature Request as it should be possible to implement some sort of runtime or source filter-ish fix for older perls. Don't know when/if that would happen but keeping the ticket open as a reminder.

     
  • Chris Marshall
    Chris Marshall
    2015-02-22

    After a more careful look, I don't think a runtime fix for the lvalue sub temporary return problem would be reliable or particularly useful. We need to keep this in the Known_problems for the distribution and, if possible, find a way to inform the user about the needed workaround.

     
  • Chris Marshall
    Chris Marshall
    2015-02-24

    The problem is fixed in perl versions since 5.16.0 and a complete workaround is available for older perls.

     
  • Chris Marshall
    Chris Marshall
    2015-02-24

    • status: open-remind --> closed-wont-fix
     
<< < 1 2 (Page 2 of 2)