Skip Menu |

This queue is for tickets about the Devel-hdb CPAN distribution.

Report information
The Basics
Id: 127319
Status: resolved
Priority: 0/
Queue: Devel-hdb

People
Owner: Nobody in particular
Requestors: whumann [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.24
Fixed in: (no value)



Subject: Devel::hdb does not work with source-filters (?)
In my code I use PDL and PDL::NiceSlice which implements an improved syntax for slicing PDL-vectors/-matrices via a perl source filter. Lines that use this syntax, e.g.: $re(1 : $last_corr) *= $sqrt2; fail with a "Can't modify non-lvalue subroutine call" when I use Devel::hdb but don't fail in a non-debug run. Using the standard perl-debugger with "-d" also works. Therefore I expect, that the source filter of PDL::NiceSlice is bypassed when using Devel::hdb. If, for whatever reason, this can't/won't be fixed it should at least be documented.
On Tue Oct 09 03:43:11 2018, whumann wrote: Show quoted text
> In my code I use PDL and PDL::NiceSlice which implements an improved > syntax for slicing PDL-vectors/-matrices via a perl source filter. > Lines that use this syntax, e.g.: > $re(1 : $last_corr) *= $sqrt2; > fail with a "Can't modify non-lvalue subroutine call"
I don't have any experience using PDL, but the program below seems to fail in the same way. It looks like a bug in the underlying Devel::Chitin and l-value subroutines, not with source filters. I've opened an issue for it (https://github.com/brummett/Devel-Chitin/issues/69). I'll leave this issue open so I can report back when I've fixed it. ---------- my $x = 1; sub x : lvalue { $x; } print "$x\n"; x() = 2; # Dies: Can't modify non-lvalue subroutine call of &DB::sub print "$x\n"; ------------
I've made a PR in the Cevel::Chitin repo that fixes the lvalue problem as I understand it: https://github.com/brummett/Devel-Chitin/pull/71 Can you check out the lvalue-subs branch from that repo, put it's 'lib' directory early in your PERL5LIB path (with perl's -I option, for example), and see if your problem with PDL is fixed?
Yes, I don't get that error any more. Thanks a lot for the quick fix! On the command line I get errors like: 'failed to deparse: Can't locate object method "pp_iter" via package "Devel::Chitin::OpTree"' when hitting a breakpoint, but I don't recognize any functional problems related to that. Want me to open another ticket for that? Finally, I see functions for saving and loading configuration in Devel::hdb::Client. Are there ways to use these from the GUI? (or even have them executed in the background so that I restart with the same breakpoints etc. as before) Thanks again for a useful module and really fast maintenance!
On Thu Oct 11 09:23:00 2018, whumann wrote: Show quoted text
> Yes, I don't get that error any more. Thanks a lot for the quick fix!
Cool. I'll get a new release out in the next couple of days. Show quoted text
> On the command line I get errors like: > 'failed to deparse: Can't locate object method "pp_iter" via package > "Devel::Chitin::OpTree"' > when hitting a breakpoint, but I don't recognize any functional > problems related to that.
There's a somewhat recently added feature where it'll try to highlite the next statement that would execute if you hit Step Over. To make that work, Devel::Chitin includes some functionality to deparse parts of the running program back into Perl code, and then it tries to match the deparse with what's on the current line of the program. If there's something unexpected in the deparsing, it'll print out a message like that, but it's not fatal. Show quoted text
> Want me to open another ticket for that?
I could make the deparser better if you'd make a new issue at https://github.com/brummett/Devel-Chitin/issues with a concise, complete example that demonstrates the problem, along with the version of Perl you're using. Show quoted text
> Finally, I see functions for saving and loading configuration in > Devel::hdb::Client. Are there ways to use these from the GUI? (or even > have them executed in the background so that I restart with the same > breakpoints etc. as before)
Yes, there's a thick divider between the code and watched-variable panes. If you click on the divider, the right side will change to show all the breakpoints. There are two icons at the top to load/save breakpoints. Show quoted text
> Thanks again for a useful module and really fast maintenance!
No problem. Thanks for helping make it better.
I've put out a new release of Devel::Chitin that contains this fix.