Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 99054
Status: resolved
Priority: 0/
Queue: Devel-StackTrace

People
Owner: Nobody in particular
Requestors: rmesser [...] intellisurvey.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 2.00



Subject: ability to set global default for no_refs
Devel::Stacktrace by default tends to build circular objects that never go out of scope. That causes memory leaks if the perl interpreter doesn't quit after the stack trace. So there is the nice "no_refs" input which allows callers to create stack traces that stringify their object, thus allowing them to go out of scope. The problem (for us anyway) comes in when we are using Moose in a web server, and exceptions are thrown but we don't want the web server to exit. The same issue comes up in test scripts run together under the same perl interpreter (we do this to speed them up and avoid incurring start-up overhead with each test). There is no way to set the no_refs input, at least not easily. Therefore, this feature request is for the ability to set a global default for no_refs, which could be set via some simple class method call. So a caller would do Devel::StackTrace->set_default_no_refs(1), and then by default no_refs would be on when it wasted explicitly passed via the constructor. This would be a simple addition and would allow us to avoid leaking a bit of memory.
The latest release defaults to not capturing refs, so I'm going to mark this as resolved.