Awesome route graph with MojoX::Routes::AsGraph

We are testing out Sebastian’s Mojolicious framework for use in a Nordaaker project. Mojolicious uses an routes-based dispatcher, which is nice, but sometimes it’s hard to keep track of how everything is routed. Luckily Melo already has an excellent solution for this:

routes.dot

Just check out MojoX::Routes::AsGraph , which can generate these lovely graphs for you. It can even generate Ascii graphs, if you’re a hard-core console user (Thanks to vti for telling me about that, as well as showing me this module in the first place :).

13:46 < vti>     my $graph = MojoX::Routes::AsGraph->graph($r)->as_ascii;

With that the above graph looks something like this:

Default

Would be nice to see something similar for Catalyst, to visualize all the chains and dispatch points.

Tags: , , ,

Trackbacks:

  1. Twitted by hatebu_3 Says:

    [...] This post was Twitted by hatebu_3 – Real-url.org [...]

  2. marcus ramberg » Blog Archive » Awesome route graph with MojoX::Routes::AsGraph | 次なるもの Says:

    [...] original article [...]

  3. I love lazy web / Catalyst dispatcher graphsmarcus ramberg » Perl | rapid-DEV.net Says:

    [...] that people are actually reading my ramblings. For instance, Franck Cuny read my description of the Mojo routes graph generator. Then he took it upon himself to write the Catalyst equivalent. That is just so [...]

  4. marcus ramberg » Blog Archive » I love lazy web / Catalyst dispatcher graphs Says:

    [...] that people are actually reading my ramblings. For instance, Franck Cuny read my description of the Mojo routes graph generator. Then he took it upon himself to write the Catalyst equivalent. That is just so [...]