dump_attr
Returns an string to dump the content of a request.
get($variable_name)
Retrieve value of a session or request variable.
The format for the variable name is
(<scope>:)?<variable>
If no scope is given it default to the request scope.
Valid scopes are:
session, s
Session variables.
request, r
Request attributes.
For example:
$r->get('request:sender'); # retrieve sender from request
$r->get('r:sender'); # short format
$r->get('sender'); # scope defaults to request
$r->get('session:user_policy'); # retrieve session variable user_policy
$r->get('s:user_policy'); # the same
new_from_fh($fh)
An object constructor for creating an request object with the content read for the supplied filehandle
$fh.
Will die if am error ocours:
error parsing request
A line in the request could not be parsed.
while reading request: <io-error>
The filehandle had an error while reading the request.
connection closed by peer
Connection has been closed while reading the request.
could not parse request
The client did not send a complete request.
do_cached($key,$sub)
This method will execute the function reference give in $sub and store the return values in $key within
the session. If there is already a cached result stored within $key of the session it will return the
content instead of calling the reference again.
Returns an Array with the return values of the function call.
Example:
my ( $ip_result, $info ) = $r->do_cached('rbl-'.$self->name.'-result',
sub { $self->_rbl->check( $ip ) } );
is_already_done($key)
This function will raise an flag with name of $key within the session and return true if the flag is
already set. False otherwise.
This could be used to prevent scores or headers from being applied a second time.
Example:
if( defined $self->score && ! $r->is_already_done('rbl-'.$self->name.'-score') ) {
$self->add_score($r, $self->name => $self->score);
}
is_attr_defined
Returns true if all given attribute names are defined and non-empty.