.replyrc.pl

changeset 703
cce8cf3118c5
parent 701
437293466a17
child 894
796aae0de126
equal deleted inserted replaced
702:f817544836c7 703:cce8cf3118c5
5 class => {show_methods => 'public', inherited => 'public'}, 5 class => {show_methods => 'public', inherited => 'public'},
6 }; 6 };
7 7
8 use Path::Tiny; 8 use Path::Tiny;
9 9
10
11 # This is extra awkward bc Data::Printer has no introspection of its config.
12 # These values need to mirror what's set above, or defaults.
13 my $ddp_show_private = 0;
14 my $ddp_show_inherited = 1;
15
16 sub ddp_toggle_private {
17 my $val = ($ddp_show_private ^= 1) ? 'all' : 'public';
18 Data::Printer->import({class => {show_methods => $val}});
19 $val;
20 }
21
22 sub ddp_toggle_inherited {
23 my $val = ($ddp_show_inherited ^= 1) ? 'public' : 'none';
24 Data::Printer->import({class => {inherited => $val}});
25 $val;
26 }
27
10 1; 28 1;

mercurial