4 #$Pod::Text::termcap=1;
6 my $site_perl = "./FS";
7 #my $catman = "./catman";
8 #my $catman = "./htdocs/docs/man";
9 #my $html = "./htdocs/docs/man";
10 my $html = "./httemplate/docs/man";
14 die "Can't find $site_perl" unless -d $site_perl;
15 #die "Can't find $catman" unless -d $catman;
16 die "Can't find $html" unless -d $html;
18 #make some useless links
20 glob("$site_perl/bin/freeside-*"),
22 next if $file =~ /\.pod$/;
23 #symlink $file, "$file.pod"; # or die "link $file to $file.pod: $!";
24 system("cp $file $file.pod");
28 glob("$site_perl/*.pm"),
29 glob("$site_perl/*/*.pm"),
30 glob("$site_perl/*/*/*.pm"),
31 glob("$site_perl/bin/*.pod"),
32 glob("./fs_sesmon/FS-SessionClient/*.pm"),
33 #glob("./fs_signup/FS-SignupClient/*.pm"),
34 glob("./fs_selfservice/FS-SelfService/*.pm"),
35 glob("./fs_selfadmin/FS-MailAdminServer/*.pm"),
37 next if $file =~ /(^|\/)blib\//;
38 #$file =~ /\/([\w\-]+)\.pm$/ or die "oops file $file";
40 if ( $file =~ /fs_\w+\/FS\-\w+\/(.*)\.pm$/ ) {
42 } elsif ( $file =~ /$site_perl\/(.*)\.(pm|pod)$/ ) {
45 die "oops file $file";
48 my $htmlroot = join('/', map '..',1..(scalar($file =~ tr/\///)-2)) || '.';
49 # system "pod2text $file >$catman/$name.txt";
50 system "pod2html --podroot=$site_perl --podpath=./FS:./FS/UI:.:./bin --norecurse --htmlroot=$htmlroot $file >$html/$name.html";
51 #system "pod2html --podroot=$site_perl --htmlroot=$htmlroot $file >$html/$name.html";
52 # system "pod2html $file >$html/$name.html";
55 #remove the useless links
56 unlink glob("$site_perl/bin/*.pod");