- or download this
get '/my_stuff' => sub {
my $my_stuff = config->{my_stuff} || {};
...
set my_stuff => {X => 'newX', Y => 'newY'};
return 'New stuff configured.';
};
- or download this
$ cat config.yml
my_stuff: { X: 'oldX' }
- or download this
$ curl http://localhost:3000/my_stuff
X[oldX] Y[not set]
...
$ curl http://localhost:3000/my_stuff
X[newX] Y[newY]