.replyrc.pl

Tue, 03 Dec 2019 19:03:37 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Tue, 03 Dec 2019 19:03:37 -0600
changeset 840
77fce3af6e0c
parent 703
cce8cf3118c5
child 894
796aae0de126
permissions
-rw-r--r--

update perltidyrc

698
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 use lib glob('~/.lib/perl5');
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 use Data::Printer {
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 filters => {-external => ['JSON', 'URI']},
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 class => {show_methods => 'public', inherited => 'public'},
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 };
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 use Path::Tiny;
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
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
e5389e9fdb82 less magic
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 1;

mercurial