Skip Menu |

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

Report information
The Basics
Id: 65238
Status: open
Priority: 0/
Queue: Devel-StackTrace-WithLexicals

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

Bug Information
Severity: Normal
Broken in: 0.08
Fixed in: (no value)



Subject: Bleadperl v5.13.8-259-g949cf49 and following broke D:ST:WL 0.08
Related ticket is https://rt.cpan.org/Ticket/Display.html?id=64828 about Devel::StackTrace. Dave has since released 1.27 and fixed the issue. Devel::StackTrace::WithLexicals seems to be affected similarly and maybe needs to port the fix over, I have not looked. HTH, Best Wishes!
I'm trying Git version c311048061f0ab6253c79e4bc9c92c0ce707ba00 on perl v5.14.2 (on Debian). I guess you're talking about the problem that the values in the lexicals hashes are stringified instead of the actual objects, correct? Test case: #!/usr/bin/perl -w use strict; use warnings FATAL => 'uninitialized'; (my $email='ch%christianjaeger,ch')=~ tr/%,/@./; use Devel::StackTrace::WithLexicals; print ${ Devel::StackTrace::WithLexicals->new->{raw}->[-1]->{lexicals}{'$email'} },"\n"; __END__ ./Devel_StackTrace_WithLexicals_test Can't use string ("SCALAR(0x87d43a0)") as a SCALAR ref while "strict refs" in use at ./Devel_StackTrace_WithLexicals_test line 7.
Ok, was too quick. unsafe_ref_capture => 1 is all there's needed to get the references. The questions I still have: 1. why not make Devel::StackTrace::WithLexicals behave as Devel::StackTrace by default, i.e. leave stringification off? Probably because you include lexicals and hence many more references. But I don't see how you'd get circular (and hence incollectable) references because of that, as long as you don't do something like my $foo; ... ; $foo= Devel::StackTrace::WithLexicals->new (which might put a reference to $foo inside the object at $foo). As long as you don't mutate $foo after its introduction, you should be safe, I'd say. 2. should this issue here be closed, as Devel-StackTrace-WithLexicals from Github (d0ea35b4fea8599557ca33469762d772e1babb19) works fine on my perl v5.14.2 (on Debian). Thanks, Christian.