NAME
Data::Printer::Filter::EscapeNonPrintable - escape missing ASCII nonprintable characters
SYNOPSIS
In your .dataprinter:
print_escapes = 1
filters = EscapeNonPrintable
Alternatively:
use DDP print_escapes => 1, filters => ['EscapeNonPrintable'];
DESCRIPTION
This module is a filter plugin for Data::Printer.
Rationale
Since DDP does not escape all ASCII control chars in print_escapes, this filter escapes them to octal notation. Vertical tab (\x0b) and DEL (\x7f) chars are also missed, thus escaped.
All the missing chars are colorized to their escaped color theme.
Note that this is a hack; the proper way to fix this should be to patch DDP.
See:
DECORATING
To call this filter and process its result from another filter, you can use:
my $str = Data::Printer::Filter::EscapeNonPrintable::parse( $ref, $ddp );
Note that the loading order of filters matters, so ensure the caller is the last one in the chain.
BUGS
Report bugs at https://github.com/ryoskzypu/Data-Printer-Filter-EscapeNonPrintable/issues.
AUTHOR
ryoskzypu <ryoskzypu@proton.me>
SEE ALSO
COPYRIGHT
Copyright © 2026 ryoskzypu
MIT-0 License. See LICENSE for details.