root/tags/mogilefs-server-2.17/makedocs.pl

Revision 649, 0.8 kB (checked in by bradfitz, 2 years ago)

to exclude brad's symlinks

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2
3 use strict;
4
5 my $base = "/home/lj/htdocs/dev/mogdocs/";
6 my $pshb = Goats->new;
7 $pshb->batch_convert([qw(mogstored mogilefsd lib)], $base);
8
9 package Goats;
10
11 use strict;
12 use base 'Pod::Simple::HTMLBatch';
13
14 sub modnames2paths {
15     my ($self, $dirs) = @_;
16
17     my @files;
18     my @dirs;
19
20     foreach my $path (@{$dirs || []}) {
21         if (-f $path) {
22             push @files, $path;
23         } else {
24             push @dirs, $path;
25         }
26     }
27
28     my $m2p = $self->SUPER::modnames2paths(\@dirs);
29
30     foreach my $file (@files) {
31         my ($tail) = $file =~ m!([^/]+)\z!;
32         $m2p->{$tail} = $file;
33     }
34
35     # these are symlinks in brad's lib
36     foreach my $k (keys %$m2p) {
37         delete $m2p->{$k} if $k eq "Danga::blib::lib::Danga::Socket" || $k eq "Danga::Socket";
38     }
39
40     return $m2p;
41 }
Note: See TracBrowser for help on using the browser.