X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/9b76d38ad3dc8f7135e5c2b1594e6815790808bc..HEAD:/eg/plpinfo.plp diff --git a/eg/plpinfo.plp b/eg/plpinfo.plp index 9578327..e22ca84 100644 --- a/eg/plpinfo.plp +++ b/eg/plpinfo.plp @@ -24,10 +24,11 @@ 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"], + ["Server API" => $PLP::interface ? $PLP::interface : "?"], + ["Perl" => sprintf '%vd', $^V], + ["Perl API" => $Config{api_versionstring} || "?"], + ["Build Date" => $Config{cf_time} || "?"], + ["Debug Build" => $^P ? "yes ($^P)" : "no"], ["Thread Safety" => $Config{usethreads} ? "enabled" : "disabled"], ["Include Path" => join "; ", @INC], ); @@ -40,13 +41,13 @@ printf "%s%s\n", @$_ for ( my %modules; s!/!::!g, s/\.pm$// and $modules{$_} = $_->VERSION || "" for keys %INC; printf "%s%s\n", @$_ for ( - ["Modules" => join "
\n", + ["Loaded Modules" => join "
\n", map "$_ $modules{$_}", sort grep /^PLP/, keys %modules ], - ["Debug Output" => join "; ", + ["Debug Output" => join("; ", $PLP::DEBUG & 1 ? "run-time errors" : (), $PLP::DEBUG & 2 ? "headers" : (), - ], + ) || "disabled"], ["Caching" => $PLP::use_cache ? "on" : "off"], #TODO ); :> @@ -57,7 +58,7 @@ printf "%s%s\n", @$_ for ( <: s/(?<=,)//g for values %ENV; # allow breaks at commas (HTTP_ACCEPT*) printf("%s%s\n", - $_, defined $ENV{$_} ? $ENV{$_} : "no value" + $_, defined $ENV{$_} ? EscapeHTML($ENV{$_}) : "no value" ) for sort keys %ENV; :> @@ -65,9 +66,9 @@ printf("%s%s\n", <: -for my $var qw(get post cookies header) { +for my $var (qw[ get post cookies header ]) { printf("\n", - $var, $_, defined $$var{$_} ? $$var{$_} : "no value" + $var, $_, defined $$var{$_} ? EscapeHTML($$var{$_}) : "no value" ) for sort keys %$var; } :>
%s{'%s'}%s