/* i don't browse full screen to have a small textarea :) */
textarea { width: 100%; height: 300px; }
/* Code blocks in a nice white-bordered gray box */
pre tt { display: block; background-color: #404040; border:
1px solid white; width: 90%; padding: 0px 2ex 2ex 2ex; }
/* I like a little feedback now and then */
a:hover { color: blue; }
####
use constant HAS_MODPERL => eval { require Apache; };
unless ( HAS_MODPERL ) {
require CGI;
}
####
use vars qw($request %Args);
$request = HAS_MODPERL ? Apache->request : new CGI;
%Args = HAS_MODPERL ? $request->args : $request->Vars;
####
&output(\$out, $request) and exit;
####
sub output {
my $out = shift;
$out = ref $out ? $$out : $out;
my $request = shift;
if ( "$request" =~ /Apache/ ) { #test class
$request->header_out("Content-Length" => length($out));
$request->content_type('text/html');
$request->send_http_header;
} else {
print $request->header(-type => 'text/html',
-length => length($out) );
}
print $out;
}