3 # Originally by: Zbigniew Lukasiak, C<zz bb yy@gmail.com>
4 # but refactored and modified to our nefarious purposes
6 # XXX I'm not done refactoring this yet --blblack
18 # Convert filename to package name
21 my $filecont = read_file( $file );
22 $filecont =~ /package\s*(.*?);/s or return;
28 my @files = File::Find::Rule->file()->name('*.pm', '*.pod')->in('lib');
31 for my $file (@files){
32 my $package = getpac( $file ) or next;
33 my $pc = Pod::Coverage->new(package => $package);
34 my %allsyms = map {$_ => 1} $pc->_get_syms($package);
35 my $podarr = $pc->_get_pods();
37 for my $sym (@{$podarr}){
38 $docsyms{$sym}{$package} = $file if $allsyms{$sym};
43 for my $sym (sort keys %docsyms){
44 for my $pac (sort keys %{$docsyms{$sym}}){
45 push @lines, {symbol => $sym, package => $pac};
49 my $tt = Template->new({})
50 || die Template->error(), "\n";
52 $tt->process(\*DATA, { lines => \@lines })
53 || die $tt->error(), "\n";
62 [% FOR line = lines %]
63 L<[% line.symbol %] ([% line.package %])|[% line.package %]/[% line.symbol %]>