Closed atoomic closed 4 years ago
Thanks.
Do you mean an exported function, or do you mean as a module name, so you can do use YPH
?
I think there is an alternative for you: https://metacpan.org/release/XXX
It has several debugging functions, and if you load it via commandline -MXXX
, then you still have a relatively short name even when using the full package name:
XXX::XXX(\%data);
XXX::YYY(\%data);
The cool thing is, you can choose the module for dumping: https://metacpan.org/pod/release/INGY/XXX-0.35/lib/XXX.pm#CONFIGURATION
In version 0.32 I added the possibility to choose the module via an environment variable, and I have set up an alias for this:
alias xxxcolor="export PERL_XXX_DUMPER=YAML::PP::Highlight"
alias xxxnocolor="export PERL_XXX_DUMPER=''"
So I can easily turn on colored highlighting when needed.
I didn't show this in the lightning talk because no time ;-)
yes I was thinking as a module name so it's easy to plug and use the dirty way :-)
XXX
is an illustration of what I had in mind.
I think we can close this case and simply use XXX
:-)
thanks @perlpunk, great talk at #TPCiC2020
This is just a suggestion, not a bug report.
YAML::PP::Highlight
is great but I would really enjoy using a shorter alias, maybeYPH
, to add it at a lower cost when debugging?