Data-Printer icon indicating copy to clipboard operation
Data-Printer copied to clipboard

Altering Parameters within Perl6

Open hhg7 opened this issue 7 years ago • 0 comments

I'm printing data in Perl6 with Data::Printer which is a spectacular package, but am trying to alter parameters and am not able to:

For example, I want

HG00112 {
    gained_site                    {
        9:10162   0,
        9:10272   var{HG00112}{gained_site}{9:10162},
        9:10326   var{HG00112}{gained_site}{9:10162},
        ...
}(tied to Perl6::Hash)

to look like

HG00112 {
    gained_site                    {
        9:10162   0,
        9:10272   0,
        9:10326   0,
        ...
}(tied to Perl6::Hash)

for easier readability (I don't care about tied to Perl6::Hash specifically)

I normally load the package using use Data::Printer:from<Perl5>, and using suggestions from

https://stackoverflow.com/questions/54601397/terminal-ansi-colors-does-not-work-with-inlineperl5-dataprinter

I have tried using that with advice from https://metacpan.org/pod/Data::Printer , namely

use Data::Printer:from<Perl5> {show_tied => 0}

& use Data::Printer:from<Perl5> show_tied => 0

but both show the error

Error while importing from 'Data::Printer': no such tag 'show_tied'

how can I get the output from Data::Printer to look like the second code selection, without the ugly var{...?

This is a copy of a post from stackoverflow: https://stackoverflow.com/questions/55799219/altering-parameters-in-dataprinter-in-perl6

hhg7 avatar Apr 22 '19 19:04 hhg7