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_selfadmin/FS-MailAdminServer/*.pm"),
36 next if $file =~ /(^|\/)blib\//;
37 #$file =~ /\/([\w\-]+)\.pm$/ or die "oops file $file";
39 if ( $file =~ /fs_\w+\/FS\-\w+\/(.*)\.pm$/ ) {
41 } elsif ( $file =~ /$site_perl\/(.*)\.(pm|pod)$/ ) {
44 die "oops file $file";
47 my $htmlroot = join('/', map '..',1..(scalar($file =~ tr/\///)-2)) || '.';
48 # system "pod2text $file >$catman/$name.txt";
49 system "pod2html --podroot=$site_perl --podpath=./FS:./FS/UI:.:./bin --norecurse --htmlroot=$htmlroot $file >$html/$name.html";
50 #system "pod2html --podroot=$site_perl --htmlroot=$htmlroot $file >$html/$name.html";
51 # system "pod2html $file >$html/$name.html";
54 #remove the useless links
55 unlink glob("$site_perl/bin/*.pod");