Open clharrison opened 1 year ago
Hi. I stumbled on this a couple of years ago. The issue is with DB::Pluggable. I've finally adopted the module and updated it with a fix. The new version is 1.12 and here is the repository:
github.com/kcaran/DB-Pluggable
You can now add Data::Printer configuration in your .perldb file if you wish. I found that redirecting the output to *DB::OUT helps with displaying unicode characters correctly. Here's mine:
use DB::Pluggable;
DB::Pluggable->run_with_config( \<<EOINI );
[DataPrinter]
sort_keys = 1
colored = 1
output = *DB::OUT
theme = Solarized
string_max = 8192
EOINI
I set up to use Data::Printer from the debugger using these instructions. It successfully rebound the debugger's p() command, except that it prints the data twice in succession:
Test program
foo.pl
:Debug session:
Also note that the same documentation demonstrates how to bind an alias (px) to a subroutine that invokes Data::Printer::p(). The line reading
print Data::Printer::p($expr)
will print $expr twice; it should read simplyData::Printer::p($expr)