Hi all: Since I upgraded to perl 5.10.1, I've been having an annoying trouble with debugging lvalue subs in PDL.
When I run across such a subroutine in the debugger, I cannot step over it with 'n', I am forced to step into it, as if I had typed 's'. So if I run this script with perl -d use PDL; $a = sequence(10); $b = $a->nslice([0,4]); print $b; the third line takes me on a long tour through PDL::nslice before allowing me to the 'print $b' line. One long scripts that make extensive use of slicing, this can be a real headache! After some experimentation, it seems that: 1) This only happens with pure-perl lvalue subs. These are the subs listed in 'Lvalue.pm' which are not implemented directly in PP (like index). 2) If I comment out 'use Lvalue;' in PDL.pm, the problem with the debugger goes away. The problem is that then the subs cannot be used as lvalues, so: $a->nslice([0,4]) .= 7; fails with: Can't modify non-lvalue subroutine call at /home/cosmicops/src_doug/test_pdl_debug.pl line 17. at /home/cosmicops/src_doug/test_pdl_debug.pl line 17 In this case I can instead use: (my $tmp = $a->nslice([0,4])) .= 7; but that is ugly and breaks a lot of existing code. Does anyone have any ideas (or fixes!) for this problem? Thanks much, Doug [email protected] Software Engineer UCAR - COSMIC, Tel. (303) 497-2611 _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
