On Wednesday, December 7, 2016 at 11:17:28 PM UTC-8, Yuichiro wrote: > > I want to change controllers depending on the $status, using the same URL > route, but the > Starlet worker (or the Mojolicious app) seems to keep dispatching the > first controller that was defined. >
What you are actually doing is trying to change routes after your first request comes in, which is not possible [1] (without restarting your app). This is why the controller that is servicing your requests is "sticky" (stays the same no matter what the status is) after the first request comes in. You may want to use a single controller/action method for the URL, and in there route the request in that controller to another class dynamically based on the status from your database. Thanks, Brian [1] https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Routing.pod#Rearranging-routes -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
