forked from mogilefs/MogileFS-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makedocs.pl
executable file
·41 lines (30 loc) · 822 Bytes
/
makedocs.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl
use strict;
my $base = "/home/lj/htdocs/dev/mogdocs/";
my $pshb = Goats->new;
$pshb->batch_convert([qw(mogstored mogilefsd lib)], $base);
package Goats;
use strict;
use base 'Pod::Simple::HTMLBatch';
sub modnames2paths {
my ($self, $dirs) = @_;
my @files;
my @dirs;
foreach my $path (@{$dirs || []}) {
if (-f $path) {
push @files, $path;
} else {
push @dirs, $path;
}
}
my $m2p = $self->SUPER::modnames2paths(\@dirs);
foreach my $file (@files) {
my ($tail) = $file =~ m!([^/]+)\z!;
$m2p->{$tail} = $file;
}
# these are symlinks in brad's lib
foreach my $k (keys %$m2p) {
delete $m2p->{$k} if $k eq "Danga::blib::lib::Danga::Socket" || $k eq "Danga::Socket";
}
return $m2p;
}