03 Mar 2021 22:30:38 UTC
- Distribution: Data-Printer
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone repository
- Issues (12)
- Testers (172 / 0 / 0)
- KwaliteeBus factor: 1
- 90.91% Coverage
- License: perl_5
- Activity24 month
- Download (112.29KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- SEE ALSO
Data::Printer::Filter::Digest - pretty-printing MD5, SHA and many other digests
filters = Digest
You may also setup the look and feel with the following options:
filter_digest.show_class_name = 0 filter_digest.show_reset = 1 # you can even customize your themes: colors.digest = #27ac3c
This is a filter plugin for Data::Printer. It filters through several message digest objects and displays their current value in hexadecimal format as a string.
Any module that inherits from Digest::base. The following ones are actively supported:
If you have any suggestions for more modules or better output, please let us know.
Aside from the display color, there are a few other options to be customized via the
If set to true (the default) the class name will be displayed right next to the hexadecimal digest.
If set to true (the default), the filter will add a
[reset]tag after dumping an empty digest object. See the rationale below.
The digest operation is effectively a destructive, read-once operation. Once it has been performed, most Digest::* objects are automatically reset and can be used to calculate another digest value.
This behaviour - or, rather, forgetting about this behaviour - is a common source of issues when working with Digests.
This Data::Printer filter will not destroy your object. Instead, we work on a cloned version to display the hexdigest, leaving your original object untouched.
As another debugging convenience for developers, since the empty object will produce a digest even after being used, this filter adds by default a
[reset]tag to indicate that the object is empty, in a 'reset' state - i.e. its hexdigest is the same as the hexdigest of a new, empty object of that same class.
Module Install Instructions
To install Data::Printer, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Data::Printer
For more information on module installation, please visit the detailed CPAN module installation guide.