I'm wanting to dynamically set the controller in, for example, an under

my $admin = $self->routes->under('/admin' => sub { ... });


The only way I have found is like so

my $admin = $self->routes->under('/admin' => sub {
  shift->match->stack->[-1]->{controller} = 'something';
});


Is this the right way?  The best way?  The only way?

I could have sworn it was possible to set the controller in an under by
simply setting it in the stash, but that is not working for me.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFTGpPNNfc5E9oPj-KzV6nD4-%3DBXQHyz-iJHwoeWCi3bjg%40mail.gmail.com.

Reply via email to