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

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

to exclude brad's symlinks

  • Property svn:executable set to *
Line 
1#!/usr/bin/perl
2
3use strict;
4
5my $base = "/home/lj/htdocs/dev/mogdocs/";
6my $pshb = Goats->new;
7$pshb->batch_convert([qw(mogstored mogilefsd lib)], $base);
8
9package Goats;
10
11use strict;
12use base 'Pod::Simple::HTMLBatch';
13
14sub 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.