Apache-Wyrd

 view release on metacpan or  search on metacpan

Wyrd/Handler.pm  view on Meta::CPAN

	} else {
		#must call output before checking response, or redirects will not occur.
		$self->{'output'} = $object->output();
		$object->_shutdown;
		$dbl->get_response && return $dbl->get_response;
	}
	$dbl->{'logfile'} && $dbl->close_logfile;
	$dbl->{'dbh'} && $dbl->close_db;
	return $response;
}

=pod

=item req

return the Apache request object.  This handle has been initialized in
C<handler>

=cut

sub req {
	my ($self) = @_;
	return $self->{'req'};
}

=pod

=item errorpage

Simply a formatting method.  Given the error and the log in scalar form, outputs
an Error Page with "Internal Server Error" at the top.  Called by C<respond>
when the debugging flags are on.

=cut

sub errorpage {
	my ($self, $error, $log) = @_;
	return <<__PAGE_END__;
<H1>500: Internal Server Error</H1>
<HR>
Specific Error: $@
<HR>
$log
__PAGE_END__
}

=pod

=back

=head1 BUGS/CAVEATS/RESERVED METHODS

=head2 FREE SOFTWARE

Standard warning about GNU GPL software.  See LICENSE under the documentation
for Apache::Wyrd

=head2 (GENERALLY) UNIX-Only

This software has only tested under Linux and Darwin, but should work
for any *nix-style system.  This software is not intended for use on
windows or other delicate glassware.

=head1 AUTHOR

Barry King E<lt>wyrd@nospam.wyrdwright.comE<gt>

=head1 SEE ALSO

=over

=item Apache::Wyrd

General-purpose HTML-embeddable perl object

=item Apache::Wyrd::DBL

"Das Blinkenlights", a more-or-less mandatory module for centralization of calls
to the Apache process or an associated DBI-type database.

=item The Eagle Book

"Writing Apache Modules iwth Perl and C" by Stein E<amp> MacEachern,  Copyright
1999 O'Reilly E<amp> Associates, Inc., ISBN: 1-56592-567-X.

=back

=head1 LICENSE

Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.

See LICENSE under the documentation for C<Apache::Wyrd>.

=cut

1;



( run in 2.674 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )