PLP Version <:= $PLP::VERSION :>
<:
use Config;
printf "%s | %s |
\n", @$_ for (
["System" => qx(uname -snrvm)],
["Server API" => "CGI/FastCGI - ".$PLP::interface], #TODO
["Perl" => join ".", map ord, split //, $^V],
["Build Date" => $Config{cf_time}],
["Debug Build" => $^P ? "yes" : "no"],
["Thread Safety" => $Config{usethreads} ? "enabled" : "disabled"],
["Include Path" => join "; ", @INC],
);
:>
PLP Core
<:
my %modules;
s!/!::!g, s/\.pm$// and $modules{$_} = $_->VERSION || "" for keys %INC;
printf "%s | %s |
\n", @$_ for (
["Modules" => join "
\n",
map "$_ $modules{$_}", sort grep /^PLP/, keys %modules
],
["Debug Output" => join "; ",
$PLP::DEBUG & 1 ? "run-time errors" : (),
$PLP::DEBUG & 2 ? "headers" : (),
],
["Caching" => $PLP::use_cache ? "on" : "off"], #TODO
);
:>
Environment
<:
s/(?<=,)//g for values %ENV; # allow breaks at commas (HTTP_ACCEPT*)
printf("%s | %s |
\n",
$_, defined $ENV{$_} ? $ENV{$_} : "no value"
) for sort keys %ENV;
:>
PLP Variables
<:
for my $var qw(get post cookies header) {
printf("%s{'%s'} | %s |
\n",
$var, $_, defined $$var{$_} ? $$var{$_} : "no value"
) for sort keys %$var;
}
:>