I've been writing a new debugger for perl [1] and a suggestion was provide Devel::Peek support. [2] The problem is that Devel::Peek writes to STDERR unconditionally and that's not what is always desired. For example, the debugger could be attached to from a socket -- this is typically done in debugger front ends like Padre or Eclipse -- so output needs to go back over that socket connection. I've tried using Capture::Tiny and basically what it does underneath, but due to the weird nature of evaluation in a debugger, it doesn't work [3]. Independent of this use case, I think Devel::Peek should provide an interface where it returns a string. Looking at the code though, it looks like the simplest way to do this would be to allow an optional file handle argument. With this one could pass an in-memory filehandle. Thoughts? [1] https://github.com/rocky/Perl-Devel-Trepan [2] https://github.com/rocky/Perl-Devel-Trepan/issues/13 [3] https://github.com/rocky/Perl-Devel-Trepan/commit/b59c7db00f6f8f64579edb1e981b78625727a97bThread Next