Sun, 24 Feb 2019 00:40:58 -0500
clean up list/fill chars
698 | 1 | use lib glob('~/.lib/perl5'); |
2 | ||
3 | use Data::Printer { | |
4 | filters => {-external => ['JSON', 'URI']}, | |
5 | class => {show_methods => 'public', inherited => 'public'}, | |
6 | }; | |
7 | ||
8 | use Path::Tiny; | |
9 | ||
703
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
10 | |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
11 | # This is extra awkward bc Data::Printer has no introspection of its config. |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
12 | # These values need to mirror what's set above, or defaults. |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
13 | my $ddp_show_private = 0; |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
14 | my $ddp_show_inherited = 1; |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
15 | |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
16 | sub ddp_toggle_private { |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
17 | my $val = ($ddp_show_private ^= 1) ? 'all' : 'public'; |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
18 | Data::Printer->import({class => {show_methods => $val}}); |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
19 | $val; |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
20 | } |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
21 | |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
22 | sub ddp_toggle_inherited { |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
23 | my $val = ($ddp_show_inherited ^= 1) ? 'public' : 'none'; |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
24 | Data::Printer->import({class => {inherited => $val}}); |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
25 | $val; |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
26 | } |
cce8cf3118c5
add ddp config toggles
Meredith Howard <mhoward@roomag.org>
parents:
701
diff
changeset
|
27 | |
698 | 28 | 1; |