Maximize Data::Printer strings length
🌌 Sébastien Feugère ☔

🌌 Sébastien Feugère ☔ @smonff

About: Can opener of a teenage cat. I love Perl a lot but would also take care of your sad servers.

Location:
Rosny-sur-Seine
Joined:
May 25, 2019

Maximize Data::Printer strings length

Publish Date: Jun 27 '23
2 0

The Perl data structures and objects pretty printer Data::Printer would trim strings longer than 4096 characters (this is the default value).

This is something that can be parameterized in the ~/.dataprinter file:

# No limit!
string_max        = 0
Enter fullscreen mode Exit fullscreen mode

This default is sensible, though, because you usually don't want the program output to fill with too much text.

It might be necessary to change this value, only in a specific place. You can pass a false value to string_max to display the whole string fields:

p $object_with_long_string_values, string_max => 0;
Enter fullscreen mode Exit fullscreen mode

More information can be found in the module Customization section, along with all the available configuration parameters.

Comments 0 total

    Add comment