File: checkconfig.cgi

package info (click to toggle)
html2wml 0.4.11%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 816 kB
  • sloc: perl: 2,380; ansic: 56; makefile: 34; sh: 4
file content (26 lines) | stat: -rwxr-xr-x 751 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/perl
use strict;
my $crlf = "\015\012";

print "Content-Type: text/html$crlf$crlf", 
      "<html>\n<body>\n", 
      "<p><b>Required Modules</b><br>\n";

for my $module (qw(strict CGI File::Basename Getopt::Long HTML::Parser 
                   LWP::UserAgent POSIX Text::Template URI URI::URL)) {
    print "checking for <b>$module</b>... ";
    eval "use $module";
    print $@ ? substr($@,0,index($@," at ")) : "ok";
    print "<br>\n";
}

print "</p>\n<p><b>Optional Modules</b><br>\n";

for my $module (qw(XML::Parser XML::LibXML XML::Checker::Parser)) {
    print "checking for <b>$module</b>... ";
    eval "use $module";
    print $@ ? substr($@,0,index($@," at ")) : "ok";
    print "<br>\n";
}

print "</p>\n</body>\n</html>\n";