17 private links
I sometimes think it would be a great feature, if you could direct one (or more) live_loops (or buffers) to separate outputs - as if a live_loop or a buffer was something like a track or channel.
I have no idea if that is even technically possible and also how I would use such a feature running on my Linux system (allthough I think it should be perfectly possible via Jack).
Right now I am thinking this would make it possible to
prelisten to a running live_loop and further more
you could do some post-mixing
Does anyone share this interest? And is it a feasable feature at all?
% mojo generate lite_app optional
...
% $EDITOR optional
One could mark the date as optional by giving it a default value of undef
:
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
get '/vote/:value/*when' => { when => undef } => sub ($c) {
my $value = $c->stash('value');
my $when = $c->stash('when');
$c->render(
format => 'txt',
text => $value . ' ' . ( defined $when ? $when : 'nope' ) . "\n"
);
};
app->start;
which then allows with-or-without the date queries:
% ./optional get /vote/42 2>/dev/null
42 nope
% ./optional get /vote/42/2020/01/07 2>/dev/null
42 2020/01/07
%
app.get('/:var(bla|blabla)?', todo)
:var
sets the req.param
that you don't use. it's only used in this case to set the regex.
(bla|blabla)
sets the regex to match, so it matches the strings bla
and blablah
.
?
makes the entire regex optional, so it matches /
as well.