4 <title>plpinfo()</title>
6 body {background:#FFF; color:#000; font-family:sans-serif}
7 table, h1 {width:45em; margin:1ex auto}
8 table, h1 {border:1px solid #000; border-collapse:collapse}
9 tr {background:#CCC; color:#000}
10 th, td {text-align:left; vertical-align:baseline}
11 th, td, h1 {padding:0.1ex 0.2em}
12 th {background:#CCF; width:33%}
13 h1 {font-size:150%; width:30em; background:#99C; color:#000}
14 h2 {font-size:125%; text-align:center}
20 <h1>PLP Version <:= $PLP::VERSION :></h1>
25 printf "<tr><th>%s</th><td>%s</td></tr>\n", @$_ for (
26 ["System" => qx(uname -snrvm)],
27 ["Server API" => "CGI/FastCGI - ".$PLP::interface], #TODO
28 ["Perl" => join ".", map ord, split //, $^V],
29 ["Build Date" => $Config{cf_time}],
30 ["Debug Build" => $^P ? "yes" : "no"],
31 ["Thread Safety" => $Config{usethreads} ? "enabled" : "disabled"],
32 ["Include Path" => join "; ", @INC],
41 s!/!::!g, s/\.pm$// and $modules{$_} = $_->VERSION || "" for keys %INC;
42 printf "<tr><th>%s</th><td>%s</td></tr>\n", @$_ for (
43 ["Modules" => join "<br>\n",
44 map "$_ $modules{$_}", sort grep /^PLP/, keys %modules
46 ["Debug Output" => join "; ",
47 $PLP::DEBUG & 1 ? "run-time errors" : (),
48 $PLP::DEBUG & 2 ? "headers" : (),
50 ["Caching" => $PLP::use_cache ? "on" : "off"], #TODO
58 s/(?<=,)/<wbr>/g for values %ENV; # allow breaks at commas (HTTP_ACCEPT*)
59 printf("<tr><th>%s</th><td>%s</td></tr>\n",
60 $_, defined $ENV{$_} ? $ENV{$_} : "<i>no value</i>"
64 <h2>PLP Variables</h2>
68 for my $var qw(get post cookies header) {
69 printf("<tr><th>%s{'%s'}</th><td>%s</td></tr>\n",
70 $var, $_, defined $$var{$_} ? $$var{$_} : "<i>no value</i>"
71 ) for sort keys %$var;