Handle hostnames with upper-case letters
[webmin.git] / man / man-lib.pl
1 # man-lib.pl
2
3 BEGIN { push(@INC, ".."); };
4 use WebminCore;
5 &init_config();
6 if ($module_info{'usermin'}) {
7         &switch_to_remote_user();
8         }
9
10 $google_host = "www.google.com";
11 $google_port = 80;
12 $google_page = "/search";
13
14 # Get the paths to perl and perldoc
15 $perl_path = &get_perl_path();
16 if (&has_command("perldoc")) {
17         $perl_doc = "perldoc";
18         }
19 else {
20         $perl_path =~ /^(.*)\/[^\/]+$/;
21         if (-x "$1/perldoc") {
22                 $perl_doc = "$1/perldoc";
23                 }
24         }
25 if ($perl_doc && $] >= 5.006) {
26         $perl_doc = "$perl_doc -U";
27         }
28
29 # set_manpath(extra)
30 sub set_manpath
31 {
32 $ENV{'MANPATH'} = join(":", split(/:/, $config{'man_dir'}),
33                             split(/:/, $_[0]),
34                             "/usr/man",
35                             "/usr/share/man");
36 }
37
38 # show_view_table(heading, html)
39 # Prints a block showing the contents of a documentation page
40 sub show_view_table
41 {
42 local ($heading, $html) = @_;
43 print &ui_table_start($heading, "width=100%", 2);
44 print &ui_table_row(undef, $html, 2);
45 print &ui_table_end();
46 }
47
48 1;
49