Stratopan's interactive dependency graphs are a great tool for visualizing the relationships between Perl modules. These graphs are now feely available for most distributions on CPAN, and can be embedded in any web page by using the following markup:
<iframe src="//widgets.stratopan.com/wheel?q=Moose-2.1205" width="720" height="620" frameborder="0"></iframe>
The q
parameter is a distribution name with version
number like Moose-2.1205
or Perl-Critic-1.215
.
You can also specify a package name like DBIx::Class
in
which case the latest version of that package will be used. Multiple
distributions or packages can be specified by separating them with
commans, such as q=Moose-2.1205,Dancer2-0.140001
.
By default, the graphs are calculated using the latest non-developer
releases of all dependencies, and dependencies that are satisfied by
the Perl core version 5.16.2 are not shown. You can specify a different
version of perl by adding a perl
parameter to the url,
such as &perl=v5.8.9
. If you set &perl=0
then all core dependencies will also be shown.
To generate the graphs quickly, we cache data for the most common dependencies for up to four hours. So there will be some delay before new releases to CPAN are reflected in the graphs. All dependencies are based on the static metadata included in each distribution, so dynamic and undeclared dependencies cannot be shown.
The width
and height
attributes of the
iframe can be adjusted to fit the layout of your page. Just
remember that graphs for different distributions can vary greatly
in size. We've found that 720x620 seems to be a good size for most
distributions. Here's a live demonstration using the exact markup
shown above.