frogsausage has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, long time no see...!
Here's my situation:
I have a file that contains $hash{key}{key}{key} = "value".
$hash is defined as our
From the main code, it is read in a sub inside one of these modules.
When eval'd in that sub, its content updates the value for $hash{key}{key}{key}
I already figured out what was happening by reading the code, setting a fair number of breakpoints and using X var in the debugger.
I believe I could have done it smarter and watching $hash{key}{key}{key} and voilą.
I tried the following:
DB<341> w $hash->{key}->{key}->{key}
But it gives me this:
Use of each() on hash after insertion without resetting hash iterator +results in undefined behavior, Perl interpreter: 0x677010 at /somepat +h/cpan/5.18.4/1/somebuild/lib/perl5/Devel/Symdump.pm line 108. at /somepath/cpan/5.18.4/1/somebuild/lib/perl5/Devel/Symdump.pm line +108. Devel::Symdump::_symdump(Devel::Symdump=HASH(0x9d20270), "main") c +alled at /somepath/cpan/5.18.4/1/somebuild/lib/perl5/Devel/Symdump.pm + line 43 Devel::Symdump::_doit(Devel::Symdump=HASH(0x9d20270), "main") call +ed at /somepath/cpan/5.18.4/1/somebuild/lib/perl5/Devel/Symdump.pm li +ne 37 Devel::Symdump::new("Devel::Symdump", "main") called at [REDACTED] + line 361 [REDACTED]
Any idea?
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Watch the value of hash key in perldebug
by LanX (Cardinal) on Nov 26, 2020 at 14:55 UTC | |
by LanX (Cardinal) on Nov 26, 2020 at 15:11 UTC | |
Re: Watch the value of hash key in perldebug
by LanX (Cardinal) on Nov 26, 2020 at 15:21 UTC | |
by BillKSmith (Prior) on Nov 26, 2020 at 19:09 UTC | |
by LanX (Cardinal) on Nov 26, 2020 at 19:14 UTC | |
by BillKSmith (Prior) on Nov 26, 2020 at 22:15 UTC | |
by LanX (Cardinal) on Nov 27, 2020 at 11:24 UTC |