Skip Menu |

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

Report information
The Basics
Id: 125918
Status: resolved
Priority: 0/
Queue: Devel-MAT

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.36
Fixed in: 0.41



Subject: Preserved localised values are not identifiable
The preserved value of a `local` statement is captured somewhere on the heap, but not in a way any identification can see it: Given: eval: our $FOO = "outer value"; { local $FOO = "inner value"; Devel::MAT::Dumper::dump("inside.pmat"); } We find Show quoted text
pmat> find pv "inner"
SCALAR(PV) at 0x55bbaf9aef90: "inner value" Show quoted text
pmat> identify 0x55bbaf9aef90
SCALAR(PV) at 0x55bbaf9aef90 is: └─the symbol '$Lexical::Persistence::FOO' But yet Show quoted text
pmat> find pv "outer value"
SCALAR(PV) at 0x55bbafa22be8: "outer value" Show quoted text
pmat> identify 0x55bbafa22be8
SCALAR(PV) at 0x55bbafa22be8 is: └─not found -- Paul Evans
Thinking about it, I expect this will require more Dumper support to walk the savestack looking for these entries - experience gained during writing similar code in Future::AsyncAwait might be helpful here. -- Paul Evans
Latest bzr source now has support, at least on perl5.18 onwards. Show quoted text
pmat> identify 0x55aed5d1d070
SCALAR(PV) at 0x55aed5d1d070 is: └─[inferred] saved value of SCALAR slot of GLOB($*) at 0x55aed5ca9720, which is: └─the glob '*Lexical::Persistence::FOO" -- Paul Evans
On Mon Aug 13 12:49:20 2018, PEVANS wrote: Show quoted text
> Latest bzr source now has support, at least on perl5.18 onwards. >
> pmat> identify 0x55aed5d1d070
> SCALAR(PV) at 0x55aed5d1d070 is: > └─[inferred] saved value of SCALAR slot of GLOB($*) at 0x55aed5ca9720, > which is: > └─the glob '*Lexical::Persistence::FOO"
Now released with D-M 0.41 + D-M-D 0.38 -- Paul Evans