I would like to see a tree of all the CPAN modules in a tree-like layout
- DateTime - Infinite ... - Template - Manual - Refs - Plugins ... - SsrviceIs there a script or web interface to do that?
#!/usr/bin/perl
use strict;
open my $fh, "<", "/MINICPAN/modules/02packages.details.txt";
while ( <$fh> ) { last if/^\s*$/ } # goodbye header
my @Last_names;
while ( <$fh> ) {
my( @names ) = split/::/, (split)[0];
my $common = 0; # remove parts in common with previous module
foreach my $i ( 0.. $#Last_names ) {
last unless $Last_names[$i] eq $names[$i];
$common++;
}
foreach my $j ( $common.. $#names ) {
print "\t" x $common++, "- $names[$j]\n";
}
@Last_names = @names;
}
Re:Here's a module tree printer
muttley on 2006-07-06T13:47:21
I've updated this very slightly to find your package file automatically and ungzip it. It can also take an optional root to limit the search
http://thegestalt.org/simon/perl/cpantreeRe:Here's a module tree printer
gabor on 2006-07-06T14:02:38
Thanks for both of you!What I really would like to see is this being incorporeted to various tools such CPAN.pm and search.cpan.org (which already has something similar)