docs.roxen.comView this page in a printer friendly mode
DocsRoxen2.1Programmer ManualPerl
Copyright © 2001, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

Using In-Line Perl Code
Running Perl Scripts
Supported mod_perl API Methods

Supported mod_perl API Methods

The Perl support for Roxen 2.1 has limited support for the Apache mod_perl interface. A request object can be obtained with

$r = Roxen->request();

or, for compatibility,

$r = Apache->request();

The request object functions currently supported include:

$r->print ( @list )
$r->printf( $formatstring, @list )
$r->status( [ $status ] )
$r->status_line( [ $status ] )
$r->method()
$r->uri()
$r->filename()
$r->protocol()
$r->log_error( $message )
$r->warn( $message )
$r->get_basic_auth_pw()
$r->get_remote_host()
$c = $r->connection()

The connection object supports the following functions:

$c->auth_type()
$c->user()
$c->remote_ip()
$c->remote_host()

Additionally, two auxiliary functions are available:

Roxen->unescape_url( $url )
Roxen->unescape_url_info( $url )

For compatibility, they are also available as

Apache->unescape_url( $url )
Apache->unescape_url_info( $url )

The standard Perl functions "print" and "exit" have been overloaded so that they should reasonably safe to use, but their use is deprecated. Use $r->print() and $r->exit() instead.