if ( $file =~ /\.json$/i ) {
my $decode =
eval { require JSON::MaybeXS }
? \&JSON::MaybeXS::decode_json
: do { require JSON::PP; \&JSON::PP::decode_json };
return $decode-
override it to return a list of filenames (not full path names, just
simple filenames like "myapp.json"), your app will use these filenames to
find configuration settings.
=item C<< find_config >>
I
s allows your system-wide config in C<< /etc/myapp.json >> to be overridden
by user-specific C<< ~/.config/myapp.json >> and a local C<< ./myapp.json >>.
You should rarely need to call this manually.