TRACT: Load configs from files and the environment
use Moo;
use warnings NONFATAL => 'all';
use JSON::MaybeXS;
use IO::All;
use Try::Tiny;
use Module::Runtime 'use_module';
has _debug => (
is =>
zy => 1,
builder => sub { \&decode_json },
);
has _encode_via => (
is => 'ro',
init_arg => 'encode_via',
lazy => 1,
builder => sub { \&encode_json },
);
sub _io { io->file(shift->_loc
>new(
config_class => 'MyApp::Config',
env_key => 'MYAPP',
location => '.config.json',
);
my $config = $station->load;
=head1 DESCRIPTION
This config loader offers a couple of m