diff options
| author | Franck Cuny <franckcuny@gmail.com> | 2016-07-02 20:06:31 -0700 |
|---|---|---|
| committer | Franck Cuny <franckcuny@gmail.com> | 2016-07-02 20:06:31 -0700 |
| commit | 4b8e43f75b394a4e6169884fbfb4c606865c6a22 (patch) | |
| tree | 48cae6b8e8f9b68cae29676d8a15cb3ddbfcccda /content/post/2009-05-30-catalystx-dispatcher-asgraph.md | |
| parent | Stop using Jekyll. (diff) | |
| download | lumberjaph-4b8e43f75b394a4e6169884fbfb4c606865c6a22.tar.gz | |
Import migration from Jekyll to Hugo.
All the posts were converted, and the layout is created. This looks like
it works just fine.
Diffstat (limited to 'content/post/2009-05-30-catalystx-dispatcher-asgraph.md')
| -rw-r--r-- | content/post/2009-05-30-catalystx-dispatcher-asgraph.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/content/post/2009-05-30-catalystx-dispatcher-asgraph.md b/content/post/2009-05-30-catalystx-dispatcher-asgraph.md new file mode 100644 index 0000000..211ba51 --- /dev/null +++ b/content/post/2009-05-30-catalystx-dispatcher-asgraph.md @@ -0,0 +1,27 @@ +--- +date: 2009-05-30T00:00:00Z +summary: In which I wrote a module to visualize routes in Catalyst. +title: CatalystX::Dispatcher::AsGraph +--- + +This morning I saw [this post](http://marcus.nordaaker.com/awesome-route-graph-with-mojoxroutesasgraph/) from Marcus Ramberg about [MojoX::Routes::AsGraph](http://search.cpan.org/perldoc?MojoX::Routes::AsGraph). I liked the idea. But as I Catalyst instead of Mojo, I thought I could give a try and do the same thing for Catalyst dispatcher, and I've coded CatalystX::Dispatcher::AsGraph. For the moment only private actions are graphed. + +<img src='/imgs/routes-300x249.webp' alt='routes'> + +You use it like this: `perl bin/catalyst_graph_dispatcher.pl --appname Arkham --output routes.png` + +You can create a simple script to output as text if you prefer: + +```perl +#!/usr/bin/perl -w +use strict; +use CatalystX::Dispatcher::AsGraph; + +my $graph = CatalystX::Dispatcher::AsGraph->new_with_options(); +$graph->run; +print $graph->graph->as_txt; +``` + +The code is on [my git server](http://git.lumberjaph.net/p5-catalystx-dispatcher-asgraph.git/) for the moment. + +For thoses who are interested by visualization, I'll publish soon some (at least I think) really nice visualisations about CPAN, Perl, and his community, that we have created at [$work](http://rtgi.fr). |
