}
$def;
}
# j=as json (except the last default)
sub _ifdefj {
require JSON::MaybeXS;
my $def = pop @_;
for (@_) {
return JSON::MaybeXS::decode_json($_) if defined($_);
utside the script using environment variable,
which is more flexible. Encode data structure using JSON:
% LOG_SHOW_CATEGORY=1 \
LOG_CATEGORY_ALIAS='{"-noisy":["Foo","Bar::Baz","Quz"]}' \
LOG_C
file for short, previously "flag file") will be searched
in <PROG>.log_options. Its content is in JSON and will become init() arguments.
For example:
{"file": 1, "screen":{"level":"trace"}}
or more