Write a bunch of POD for modules that don't have it.
This commit is contained in:
parent
713d3dc801
commit
0b5d4e4614
6 changed files with 65 additions and 5 deletions
|
|
@ -18,6 +18,17 @@ use Try::Tiny;
|
|||
use Scalar::Util 'blessed';
|
||||
use HTTP::Status ();
|
||||
|
||||
=head2 transform_error ($env)
|
||||
|
||||
Transforms exceptions of the class WebGUI::Error::Fatal into HTTP 500 error messages, displaying
|
||||
the contents of the exception to the user.
|
||||
|
||||
=head3 $env
|
||||
|
||||
A Plack environment hash
|
||||
|
||||
=cut
|
||||
|
||||
sub transform_error {
|
||||
my $self = shift;
|
||||
my ($e, $env) = @_;
|
||||
|
|
@ -33,4 +44,4 @@ sub transform_error {
|
|||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -38,9 +38,15 @@ These subroutines are available from this package:
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 handler ( session )
|
||||
=head2 call ( $env )
|
||||
|
||||
The content handler for this package.
|
||||
Interface method for this middleware. It checks the settings for the special entry, upgradeState.
|
||||
If this is set, then it returns an HTTP 503. It will also clear the maintenance state when the
|
||||
upgrade is complete.
|
||||
|
||||
=head3 $env
|
||||
|
||||
A Plack environment hash. This is used to access the WebGUI Session object.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,14 @@ and not worry about closing it.
|
|||
|
||||
It also sets C<webgui.debug> as appropriate.
|
||||
|
||||
=head2 call ($env)
|
||||
|
||||
Interface method for this Middleware class.
|
||||
|
||||
=head3 $env
|
||||
|
||||
A plack environment hash
|
||||
|
||||
=cut
|
||||
|
||||
sub call {
|
||||
|
|
@ -77,6 +85,17 @@ sub call {
|
|||
);
|
||||
}
|
||||
|
||||
=head2 canShowDebug ($env)
|
||||
|
||||
Checks to see whether or not the owner of this session can see debug output. It checks
|
||||
WebGUI settings showDebug and ipDebug for this.
|
||||
|
||||
=head3 $env
|
||||
|
||||
A Plack environment hash.
|
||||
|
||||
=cut
|
||||
|
||||
sub canShowDebug {
|
||||
my $self = shift;
|
||||
my $env = shift;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,14 @@ L<WebGUI::URL::Snoop> described itself as "A URL handler that should never be ca
|
|||
|
||||
You might find this middleware useful as a template for creating other simple classes.
|
||||
|
||||
=head2 call ($env)
|
||||
|
||||
Interface method for Plack to call, for this class.
|
||||
|
||||
=head3 $env
|
||||
|
||||
A Plack environment hash
|
||||
|
||||
=cut
|
||||
|
||||
sub call {
|
||||
|
|
@ -31,4 +39,4 @@ sub call {
|
|||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,14 @@ awareness.
|
|||
This middleware should really only be used in development, for production you want
|
||||
to be serving static files with something a lot faster.
|
||||
|
||||
=head2 call ($env)
|
||||
|
||||
Interface subroutine to implement the privilege checks inside the WGaccess files.
|
||||
|
||||
=head3 $env
|
||||
|
||||
A Plack environment hash
|
||||
|
||||
=cut
|
||||
|
||||
sub call {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue