docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 6.1System Developer Manual PikeProgramming Languages
Copyright  2018, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com



Pike
Pike Script
Pike Processing Instruction
Java
Perl
Using In-Line Perl Code
Running Perl Scripts
Supported mod_perl API Methods
CGI
What is a CGI Script?
CGI Environment Variables
CGI I/O Via Standard Streams
PHP
Python

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.