Apache2-API
view release on metacpan or search on metacpan
Apache2::Log
_try( $object_type, $method_name, @_ )
Given an object type, a method name and optional parameters, this
attempts to call it, passing it whatever arguments were provided and
return its return values.
Apache2 methods are designed to die upon error, whereas our model is
based on returning "undef" and setting an exception with
Module::Generic::Exception, because we believe that only the main
program should be in control of the flow and decide whether to interrupt
abruptly the execution, not some sub routines.
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Apache2::API::DateTime, Apache2::API::Query, Apache2::API::Request,
Apache2::API::Request::Params, Apache2::API::Request::Upload,
Apache2::API::Response, Apache2::API::Status
Returns the values from ["set\_handlers" in Apache2::Server](https://metacpan.org/pod/Apache2%3A%3AServer#set_handlers) by passing it whatever arguments were provided.
## warn( @list )
Given a list of string, this sends a warning using ["warn" in Apache2::Log](https://metacpan.org/pod/Apache2%3A%3ALog#warn)
## \_try( $object\_type, $method\_name, @\_ )
Given an object type, a method name and optional parameters, this attempts to call it, passing it whatever arguments were provided and return its return values.
Apache2 methods are designed to die upon error, whereas our model is based on returning `undef` and setting an exception with [Module::Generic::Exception](https://metacpan.org/pod/Module%3A%3AGeneric%3A%3AException), because we believe that only the ...
# CONSTANTS
`mod_perl` provides constants through [Apache2::Constant](https://metacpan.org/pod/Apache2%3A%3AConstant) and [APR::Constant](https://metacpan.org/pod/APR%3A%3AConstant). [Apache2::API](https://metacpan.org/pod/Apache2%3A%3AAPI) makes all those const...
use Apache2::API;
say Apache2::Const::HTTP_BAD_REQUEST; # 400
You can import constants into your namespace by specifying them when loading [Apache2::API](https://metacpan.org/pod/Apache2%3A%3AAPI), such as:
lib/Apache2/API.pm view on Meta::CPAN
Returns the values from L<Apache2::Server/set_handlers> by passing it whatever arguments were provided.
=head2 warn( @list )
Given a list of string, this sends a warning using L<Apache2::Log/warn>
=head2 _try( $object_type, $method_name, @_ )
Given an object type, a method name and optional parameters, this attempts to call it, passing it whatever arguments were provided and return its return values.
Apache2 methods are designed to die upon error, whereas our model is based on returning C<undef> and setting an exception with L<Module::Generic::Exception>, because we believe that only the main program should be in control of the flow and decide wh...
=head1 CLASS FUNCTIONS
=head2 apr1_md5
my $md5_password = apr1_md5( $clear_password );
my $md5_password = apr1_md5( $clear_password, $salt );
This class function is exported by default.
lib/Apache2/API/Request.pm view on Meta::CPAN
=head2 keepalives
my $served = $req->connection->keepalives();
my $served = $req->connection->keepalives( $new_served );
This returns an integer representing how many requests were already served over the current connection.
This method calls L<Apache2::Connection/keepalives>
This method is only relevant for keepalive connections. The core connection output filter C<ap_http_header_filter> increments this value when the response headers are sent and it decides that the connection should not be closed (see "ap_set_keepalive...
If you send your own set of HTTP headers with C<< $req->assbackwards >>, which includes the C<Keep-Alive> HTTP response header, you must make sure to increment the C<keepalives> counter.
See L<Apache2::Connection> for more information.
=head2 languages
This will check the C<Accept-Languages> HTTP headers and derive a list of priority ordered user preferred languages and return an L<array object|Module::Generic::Array>.
See also the L</preferred_language> method.
lib/Apache2/API/Request.pm view on Meta::CPAN
Returns the user agent, ie the browser signature as provided in the request headers received under the HTTP header C<User-Agent>
=head2 _find_bin( string )
Given a binary, this will search for it in the path.
=head2 _try( object type, method name, @_ )
Given an object type, a method name and optional parameters, this attempts to call it.
Apache2 methods are designed to die upon error, whereas our model is based on returning C<undef> and setting an exception with L<Module::Generic::Exception>, because we believe that only the main program should be in control of the flow and decide wh...
=head1 AUTHOR
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
=head1 SEE ALSO
L<Apache2::Request>, L<Apache2::RequestRec>, L<Apache2::RequestUtil>
=head1 COPYRIGHT & LICENSE
lib/Apache2/API/Response.pm view on Meta::CPAN
=head2 _set_get_one
Sets or gets a header with the provided value. If the value is undefined, the header will be removed.
If no value is provided, it returns the current value as an array object (L<Module::Generic::Array>) or as a scalar object (L<Module::Generic::Scalar>) if it is not a reference.
=head2 _try( object accessor, method, [ arguments ] )
Given an object type, a method name and optional parameters, this attempts to call it.
Apache2 methods are designed to die upon error, whereas our model is based on returning C<undef> and setting an exception with L<Module::Generic::Exception>, because we believe that only the main program should be in control of the flow and decide wh...
=head1 AUTHOR
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
=head1 SEE ALSO
L<Apache2::Request>, L<Apache2::RequestRec>, L<Apache2::RequestUtil>
=head1 COPYRIGHT & LICENSE
( run in 1.213 second using v1.01-cache-2.11-cpan-de7293f3b23 )