SlideShare a Scribd company logo
 
                             mod perl Quick Reference Card                                                                          $r->send_http_header( $content_type );                                        ¡   $aref = $r->get_handlers( $str );
                             Revision 1.0 for mod perl version 1.19                                                        Server core functions                                                                              Apache->httpd_conf( $str );
                             Andrew Ford                                                                 refcards.com TM            $r->chdir_file( $file );                                                          $bool = $r->module( $name );
                                                                                                                                    $r->child_terminate();                                                            $bool = Apache->perl_hook( $name );
mod perl is an Apache module, created by Doug MacEachern,                                                                                                                                                                     $r->post_connection( $code_ref );
that embeds a Perl interpreter within the server. It provides a Perl                                                                $r->hard_timeout( $msg );
                                                                                                                                    $r->internal_redirect( $newplace );                                                       $r->push_handlers( $str => $code_ref );
                                                                                                                                                                                                                                                       
API to Apache and adds a number of Apache configuration direc-                                                                                                                                                         $r    = Apache->request( $r );          ¡
tives. Scripts using mod perl should import the Apache module,                                                                      $r->internal_redirect_handler( $newplace );
                                                                                                                           $bool = $r->is_initial_req();                                                                      $r->set_handlers( $str => $aref );
Apache::Constants, and other Apache:: modules. A reference to
the request object (denoted below by $r) is passed to Perl handlers                                                        $bool = $r->is_main();                                                                     Apache::SubRequest class
when they are invoked.                                                                                                              $r->kill_timeout();                                                               $subr = $r->lookup_uri($uri);
                                                                                                                           $str = $r->location();                                                                     $subr = $r->lookup_file($filename);
Client request methods                                                                                                     $req = $r->last();                                                                         $rc = $subr->run();
$r      = Apache->request();                                                                                               $req = $r->main();
$str = $r->args();                             # or %hash = ...                                                                                                                                                       Apache::Server class
                                                                                                                           $req = $r->next();     
$c      = $r->connection             # see Apache::Connection                                                              $str = $r->notes( $k ,$v );       # or $tab = $r->notes()
                                                                                                                                                                 ¡                                                    $s    = Apache->server                     # or $r->server
$str = $r->content();                          # or %hash = ...                                                            $req = $r->prev();                                                                         $bool = $s->is_virtual();
$str = $r->filename( $newval );                                  ¡                                                                  $r->register_cleanup( $code_ref );                                                        $s->log_error();
          $r->finfo();                                                                                                              $r->reset_timeout();                                                              $aref = $s->names();
$str = $r->get_remote_host( $lookup_type );                                                              ¡                          $r->soft_timeout( $msg );                                                         $s    = $s->next();
                  # use Apache::Constants :remotehost tag                                                                                                                                                             $num = $s->port();
                                                                                                                           $str = $r->subprocess_env( $k , $v );                                     ¡¡               $str = $s->server_admin();
$str = $r->get_remote_logname();                        
$str = $r->header_in( $hdr , $newval );                                                          ¡                         Server configuration methods                                                                $str = $s->server_hostname();
                                                                                                                           $str = $r->dir_config($k); #or $tab = $r->dir_config()
                                                                                                                                                                                                                                               
$bool = $r->header_only();                                                                                                                                                                                            $num = $s->timeout( $newval );                  ¡
$href = $r->headers_in();                      # or %hash = ...                                                            $str = $r->document_root();                                                                        $s->warn();
                                                                                                                           $str = $r->get_server_name();
$str = $r->method( $newval );                     ¡                                                                                                                                                                   Apache::Connection class
$num = $r->method_number( $nv ); # use :methods tag                  ¡                                                     $num = $r->get_server_port();                                          
                                                                                                                           $str = $r->server_root_relative( $obj );                                       ¡           $bool = $c->aborted();
$u      = $r->parsed_uri();                   # see Apache::URI                                                                                                                                                       $str = $c->auth_type();
$str = $r->path_info( $newval );                                             ¡                                             Logging and the Apache::Log class                                                          $addr = $c->local_addr();
$str = $r->protocol();                                                                                                     $str = $r->as_string();                                                                                                     
                                                                                                                                                                                                                      $addr = $c->remote_addr( $addr );                   ¡
$bool = $r->proxyreq( $newval );                                 ¡                                                                  $r->log_reason( $message, $file );                                                $str = $c->remote_host();
          $r->read( $buf, $bytes_to_read );                                                                                         $r->log_error( $message );                                                                                     
                                                                                                                                                                                                                      $str = $c->remote_ip( $ip );        ¡
$s      = $r->server                      # see Apache::Server                                                                      $r->warn( $message );                                                             $str = $c->remote_logname();
$str = $r->the_request();                                                                                                  $log = $r->log();                                                                                               
                                                                                                                           $log = $s->log();                                                                          $str = $c->user( $username );               ¡
$str = $r->uri( $newval );               ¡
                                                                                                                                    $log->emerg ( $str ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤       Apache::Table class
Server response methods                                                                                                                                                                                                                                                        
                                                                                                                                    $log->alert ( $msg ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤       $tab = Apache::Table->new( $r , $size );                            ¡
$num = $r->bytes_sent();                                                                                                                                                                                                      $tab->add( $key, $str_or_aref );
          $r->cgi_header_out( $hdr , $newval );                                                              ¡                      $log->crit ( $msg ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤
                                                                                                                                    $log->error ( $msg ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤               $tab->clear();
$str = $r->content_encoding( $newval );                                                          ¡                                                                                                                            $tab->do( $code_ref );
$aref = $r->content_languages( $newval );                                                            ¡                              $log->warn ( $msg ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤               $tab->merge( $key, $str_or_aref );
                                                                                                                                    $log->notice( $msg ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤               $tab->set( $key, $str );
$str = $r->content_type( $newval );                                                          ¡
          $r->custom_response( $code, $uri );                                                                                       $log->info ( $msg ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤       $str = $tab->get( $key );                 # or @list = ...
                                                                                                                                    $log->debug ( $msg ... $code_ref );
                                                                                                                                                     ¢                                   £                    ¤               $tab->unset($key);
$str = $r->err_header_out( $hdr , $newval );                                                                 ¡
$href = $r->err_headers_out();
                                               # or %hash = ...                                                            Access control methods                                                                     Apache::URI class                                        
$str = $r->handler( $newval );                              ¡                                                              $opts = $r->allow_options();           # use :options tag                                  $uri = Apache::URI->parse( $r , $string_uri );                              ¡
$str = $r->header_out( $hdr , $newval );                                                             ¡                     $str = $r->auth_name( $newval );                          ¡                                $str = $uri->unparse();          
$href = $r->headers_out();                     # or %hash = ...                                                            $str = $r->auth_type();                                                                    $str = $uri->component( $newval );                          ¡
$bool = $r->no_cache( $newval );                                 ¡                                                         ($rc, $pw) = $r->get_basic_auth_pw();                                                      (where component is one of: fragment, hostinfo, hostname,
$num = $r->request_time();
                                                                                                                                    $r->note_basic_auth_failure();                                                    password, path_info, path, port, query, rpath, scheme, user)
$num = $r->status( $newval );                ¡                                                                             $aref = $r->requires();                                                                    Apache::Util class
$str = $r->status_line( $newval );                                                   ¡                                     $flag = $r->satisfies();             # use :satisfies tag                                  $str = Apache::Util::escape_html( $html );
Sending data to the client                                                                                                 $bool = $r->some_auth_required();                                                          $str = Apache::Util::escape_uri( $uri );
                                                                                                                           mod_perl specific methods                                                                                                                                            
          $r->print( @list );                         # checks $|                                                                                                                                                     $str = Apache::Util::ht_time($time , $fmt , $bool );                            ¡¡
          $r->printf( $format, @args );                                                                                    $str = $r->current_callback();                                                             $secs = Apache::Util::parsedate( $date_str );
          $r->rflush();                                                                                                    $bool = $r->define( $name );                                                               $num = Apache::Util::size_string( $num );
          $r->send_cgi_header( $str );                                                                                              Apache->exit( $code );               ¡                                            $str = Apache::Util::unescape_uri( $uri );
$len = $r->send_fd( $filehandle );                                                                                         $fh = Apache->gensym();                                                                    $str = Apache::Util::unescape_uri_info( $uri );
                                                  1                                                                                                                  2                                                                                    3
Apache::Constants class                                               HTTP 1.1 headers                                                                                                                                                          Apache mod perl configuration directives
The following export tag groups are defined (HTTP status code                                                                                                                                                                                    mod perl enables Apache to be configured using Perl statements
synonyms are given in brackets):                                                                                                                                                                                                                that are contained within <Perl>. . . </Perl> sections and adds the
                                                                                                                                                                                                                                                Apache configuration directives listed below. Each directive is
:common : OK, DECLINED , DONE, NOT_FOUND , FORBIDDEN ,                Syntax                                                                                                                                                         Category   given with its arguments; defaults are given where appropriate in
  AUTH_REQUIRED (HTTP_UNAUTHORIZED ), SERVER_ERROR                    Accept: media-types ;q=qvalue , ...                      ¥                                                                      ¦         ¥ §¦                 REQUEST    parentheses at the end of the line, followed by the symbol y to
                                                                      Accept-Charset: charset ;q=qvalue , ...                                              ¥                                             ¥
                                                                                                                                                                                                         §¦              ¦           REQUEST    mark directives only valid in a directory section or .htaccess file.
:response : DOCUMENT_FOLLOWS (HTTP_OK ),
                                                                      Accept-Encoding: encoding ;q=qvalue , ...                                                            ¥                         ¥§¦                         ¦   REQUEST
  MOVED (HTTP_MOVED_PERMANENTLY),
                                                                      Accept-Language: lang ;q=qvalue , ...                                ¥                                                       ¦        ¥¨¦                      REQUEST
                                                                                                                                                                                                                                                PerlAccessHandler handler
  REDIRECT (HTTP_MOVED_TEMPORARILY),
                                                                      Accept-Ranges: bytes none        ©                                                                                                                           RESPONSE
                                                                                                                                                                                                                                                PerlAuthenHandler handler
  USE_LOCAL_COPY (HTTP_NOT_MODIFIED ),
                                                                      Age: seconds                                                                                                                                                   RESPONSE
                                                                                                                                                                                                                                                PerlAuthzHandler handler
  BAD_REQUEST , BAD_GATEWAY , NOT_IMPLEMENTED ,
                                                                      Allow: method , ...      ¥                                   ¦                                                                                                 ENTITY
  CONTINUE , NOT_AUTHORITATIVE                                                                                                                                                                                                                  PerlChildExitHandler handler                                                    y
                                                                      Authorization: scheme credentials                                                                                                                              REQUEST
                                                                                                                                                                                                                                                PerlChildInitHandler handler                                                    y
:methods : M_CONNECT , M_COPY, M_DELETE , M_GET, M_INVALID ,          Cache-Control: directive                                                                                                                                       GENERAL
                                                                                                                                                                                                                                                PerlCleanupHandler handler
  M_LOCK, M_MKCOL , M_MOVE, M_OPTIONS , M_PATCH , M_POST,             Connection: close                                                                                                                                              GENERAL
                                                                      Content-Base: uri
                                                                                                                                                                                                                                                PerlDispatchHandler handler
  M_PROPFIND , M_PROPPATCH , M_PUT, M_TRACE , M_UNLOCK , METHODS                                                                                                                                                                     ENTITY
                                                                                                                                                                                                                                                PerlFixupHandler handler
                                                                      Content-Encoding: enc                                                                                                                                          ENTITY
:options : OPT_ALL OPT_NONE , OPT_INDEXES , OPT_INCLUDES ,            Content-Language: lang                                                                                                                                         ENTITY
                                                                                                                                                                                                                                                PerlFreshRestart On Off                ¢           £       ¤             (On) y
  OPT_SYM_LINKS , OPT_EXECCGI , OPT_UNSET ,                           Content-Length: len                                                                                                                                            ENTITY
                                                                                                                                                                                                                                                PerlHandler handler
  OPT_INCNOEXEC , OPT_SYM_OWNER , OPT_MULTI ,                         Content-MD5: digest                                                                                                                                            ENTITY
                                                                                                                                                                                                                                                PerlHeaderParserHandler handler
                                                                      Content-Range: bytes range/length                                                                                                                              ENTITY
                                                                                                                                                                                                                                                PerlInitHandler handler
:satisfies : SATISFY_ALL , SATISFY_ANY , SATISFY_NOSPEC                                                                                                                                                                                         PerlLogHandler handler
                                                                      Content-Type: media-type                                                                                                                                       ENTITY
:server : MODULE_MAGIC_NUMBER , SERVER_BUILT , SERVER_VERSION         Cookie: name=value ; ...                             ¥                                                   ¦                                                     REQUEST
                                                                                                                                                                                                                                                PerlModule
                                                                      Date: date                                                                                                                                                     GENERAL    PerlPassEnv name ...                                                            y
:remotehost : REMOTE_HOST , REMOTE_NAME , REMOTE_NOLOOKUP ,           ETag: entity-tag                                                                                                                                               RESPONSE   PerlPostReadRequestHandler handler                                              y
  REMOTE_DOUBLE_REV                                                   Expect: expectation                                                                                                                                            REQUEST    PerlRequire script-file
                                                                      Expires: date                                                                                                                                                  ENTITY     PerlSendHeader On Off      ¢               £           ¤                (Off)
:http includes only those HTTP status code constants shown below in                                                                                                                                                                             PerlSetEnv name value
bold type (other HTTP constants may be imported explicitly):          From: email-address                                                                                                                                            REQUEST
                                                                      Host: hostname :port     ¥                                       ¦                                                                                             REQUEST    PerlSetVar name value
100 HTTP_CONTINUE                405 HTTP_METHOD_NOT_ALLOWED                                                                                                                                                                                    PerlSetupEnv On Off    ¢           £           ¤                        (Off)
                                                                      If-Match: entity-tag                                                                                                                                           REQUEST
101 HTTP_SWITCHING_PROTOCOLS 406 HTTP_NOT_ACCEPTABLE
                                                                      If-Modified-Since: date                                                                                                                                        REQUEST    PerlTaintCheck On Off      ¢               £           ¤                (Off) y
200 HTTP_OK                      407 HTTP_PROXY_AUTHENTICATION_
                                                                      If-None-Match: entity-tag                                                                                                                                      REQUEST    PerlTransHandler handler                                                      y
201 HTTP_CREATED                           REQUIRED
                                                                      If-Range: entity tag date
                                                                                   ©                                                                                                                                               REQUEST    PerlTypeHandler handler
202 HTTP_ACCEPTED                408 HTTP_REQUEST_TIMEOUT
203 HTTP_NON_AUTHORITATIVE       409 HTTP_CONFLICT
                                                                      If-Unmodified-Since: date                                                                                                                                      REQUEST    PerlWarn On Off
                                                                                                                                                                                                                                                              ¢    £           ¤                                        (Off) y
                                                                      Last-Modified: date                                                                                                                                            ENTITY
204 HTTP_NO_CONTENT              410 HTTP_GONE
                                                                      Location: uri                                                                                                                                                  RESPONSE   Resources
205 HTTP_RESET_CONTENT           411 HTTP_LENGTH REQUIRED
                                                                      MIME-Version: version                                                                                                                                          GENERAL
                                                                                                                                                                                                                                                http://perl.apache.org The Apache/Perl Integration Project
206 HTTP_PARTIAL_CONTENT         412 HTTP_PRECONDITION_FAILED
                                                                      Max-Forwards: number                                                                                                                                           REQUEST
                                                                                                                                                                                                                                                http://www.modperl.com Writing Apache Modules home page
300 HTTP_MULTIPLE_CHOICES        413 HTTP_REQUEST_ENTITY_TOO_LARGE
                                                                      Pragma: no-cache extension-pragma
                                                                               ©                                                                                                                                                   GENERAL
                                                                                                                                                                                                                                                http://www.apache.org                 Apache home page
301 HTTP_MOVED_PERMANENTLY       414 HTTP_REQUEST_URI_TOO_LARGE
                                                                      Proxy-Authenticate: challenge                                                                                                                                  RESPONSE
302 HTTP_MOVED_TEMPORARILY       415 HTTP_UNSUPPORTED_MEDIA_TYPE                                                                                                                                                                                http://www.perl.com                       Perl home page
                                                                      Proxy-Authorization: credentials                                                                                                                               REQUEST
303 HTTP_SEE_OTHER               500 HTTP_INTERNAL_SERVER_ERROR                                                                                                                                                                                 http://www.refcards.com           Quick reference cards
                                                                      Public: method ...                                                                                                                                             RESPONSE
304 HTTP_NOT_MODIFIED            501 HTTP_NOT IMPLEMENTED
                                                                      Range: bytes=n -m , ...  ¥¨¦ ¥                                                                   ¦                                                             REQUEST
305 HTTP_USE_PROXY               502 HTTP_BAD_GATEWAY
                                                                      Referer: url                                                                                                                                                   REQUEST
400 HTTP_BAD_REQUEST             503 HTTP_SERVICE_UNAVAILABLE                                                                                                                                                                                   mod perl Quick Reference Card
                                                                      Retry-After: date seconds
                                                                                       ©                                                                                                                                           RESPONSE
401 HTTP_UNAUTHORIZED            504 HTTP_GATEWAY_TIME_OUT                                                                                                                                                                                      A refcards.com TM quick reference card
                                                                      Server: string                                                                                                                                                 RESPONSE
402 HTTP_PAYMENT_REQUIRED        505 HTTP_VERSION_NOT_SUPPORTED                                                                                                                                                                                 Revision 1.0 for mod perl version 1.19                        [May 1999]
                                                                      Set-Cookie: name=value ; options                                                 ¥                                                     ¦                       RESPONSE   
403 HTTP_FORBIDDEN               506 HTTP_VARIANT_ALSO_VARIES                                                                                                                                                                                    c 1998, 1999 Ford  Mason Ltd. All rights reserved.
                                                                      TE: coding                                                                                                                                                     REQUEST
404 HTTP_NOT_FOUND                                                    Trailer: header                                                                                                                                                GENERAL    Permission is granted to print and duplicate this card for personal or in-
                                                                      Transfer-Encoding: coding                                                                                                                                      GENERAL    dividual, internal business use. Copies of this card ( others) can be or-
Magic global variables                                                Upgrade: protocol , ...                  ¥                                                   ¦                                                                 GENERAL    dered through our web site: http://www.refcards.com, which also has
$0, $^X, $|, $/, %@, %SIG, @INC, %INC, %ENV{MOD_PERL} ,               User-Agent: string                                                                                                                                             REQUEST    versions available for downloading.
%ENV{GATEWAY_INTERFACE}, %ENV{PERL_SEND_HEADER}                       Vary: header , ...   ¥                           ¦                                                                                                             RESPONSE   Please send feedback to: feedback@refcards.com
Special package globals                                               Via: protocol/ version (comment) , ...
                                                                           ¥                       ¦                                                           ¥                                                 ¥ ¨¦        ¦       GENERAL    refcards.com is a trademark of Ford  Mason Ltd.
$Apache::Server::CWD        $Apache::Server::SaveConfig               WWW-Authenticate: scheme realm                                                                                                                                 RESPONSE   Use of the Camel for Perl is a trademark of O’Reilly  Associates – used by permis-
$Apache::Server::ReStarting $Apache::Server::Starting                 Warning: code agent quot;textquot; date                                                                                          ¥         ¦                           GENERAL    sion.




                                   4                                                                                                                                                                 5                                                                                                         6

More Related Content

What's hot

The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of SmartmatchAndrew Shitov
 
Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!
Workhorse Computing
 
Apache Hacks
Apache HacksApache Hacks
Apache Hacks
Beth Skwarecki
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overviewjsmith92
 
PHP code examples
PHP code examplesPHP code examples
PHP code examples
programmingslides
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka
 
Utility Modules That You Should Know About
Utility Modules That You Should Know AboutUtility Modules That You Should Know About
Utility Modules That You Should Know About
joshua.mcadams
 
PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)
Win Yu
 
DPC 2012 : PHP in the Dark Workshop
DPC 2012 : PHP in the Dark WorkshopDPC 2012 : PHP in the Dark Workshop
DPC 2012 : PHP in the Dark WorkshopJeroen Keppens
 
Ruby 2.0
Ruby 2.0Ruby 2.0
Ruby 2.0
Uģis Ozols
 
High Performance tDiary
High Performance tDiaryHigh Performance tDiary
High Performance tDiary
Hiroshi SHIBATA
 
Perl
PerlPerl
Introduction to Perl Best Practices
Introduction to Perl Best PracticesIntroduction to Perl Best Practices
Introduction to Perl Best Practices
José Castro
 
Rich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 ApplicationRich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 Application
Kirill Chebunin
 
Nashvile Symfony Routes Presentation
Nashvile Symfony Routes PresentationNashvile Symfony Routes Presentation
Nashvile Symfony Routes Presentation
Brent Shaffer
 
Working with text, Regular expressions
Working with text, Regular expressionsWorking with text, Regular expressions
Working with text, Regular expressions
Krasimir Berov (Красимир Беров)
 
Design Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et Pimple
Hugo Hamon
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
Workhorse Computing
 

What's hot (20)

Perl6 grammars
Perl6 grammarsPerl6 grammars
Perl6 grammars
 
Php
PhpPhp
Php
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of Smartmatch
 
Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!
 
Apache Hacks
Apache HacksApache Hacks
Apache Hacks
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
 
PHP code examples
PHP code examplesPHP code examples
PHP code examples
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Utility Modules That You Should Know About
Utility Modules That You Should Know AboutUtility Modules That You Should Know About
Utility Modules That You Should Know About
 
PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)
 
DPC 2012 : PHP in the Dark Workshop
DPC 2012 : PHP in the Dark WorkshopDPC 2012 : PHP in the Dark Workshop
DPC 2012 : PHP in the Dark Workshop
 
Ruby 2.0
Ruby 2.0Ruby 2.0
Ruby 2.0
 
High Performance tDiary
High Performance tDiaryHigh Performance tDiary
High Performance tDiary
 
Perl
PerlPerl
Perl
 
Introduction to Perl Best Practices
Introduction to Perl Best PracticesIntroduction to Perl Best Practices
Introduction to Perl Best Practices
 
Rich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 ApplicationRich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 Application
 
Nashvile Symfony Routes Presentation
Nashvile Symfony Routes PresentationNashvile Symfony Routes Presentation
Nashvile Symfony Routes Presentation
 
Working with text, Regular expressions
Working with text, Regular expressionsWorking with text, Regular expressions
Working with text, Regular expressions
 
Design Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et Pimple
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
 

Viewers also liked

OpenWF 1.0 Composition Reference Card
OpenWF 1.0 Composition Reference CardOpenWF 1.0 Composition Reference Card
OpenWF 1.0 Composition Reference Card
The Khronos Group Inc.
 
Social Studies Exam - Strategy & Revision Guide
Social Studies Exam - Strategy & Revision GuideSocial Studies Exam - Strategy & Revision Guide
Social Studies Exam - Strategy & Revision Guide
Rahim Springfields
 
Elements of Drama
Elements of DramaElements of Drama
Elements of Drama
Rahim Springfields
 
OpenCL 2.0 Reference Card
OpenCL 2.0 Reference CardOpenCL 2.0 Reference Card
OpenCL 2.0 Reference Card
The Khronos Group Inc.
 
Elements of drama
Elements of dramaElements of drama
Elements of drama
Han Doofenshmirtz
 
QTR - Gilbert
QTR - GilbertQTR - Gilbert
QTR - Gilbert
Chelsea Alice
 
Strategic Intervention Material (SIM) Chemistry-COSMETICS
Strategic Intervention Material (SIM) Chemistry-COSMETICSStrategic Intervention Material (SIM) Chemistry-COSMETICS
Strategic Intervention Material (SIM) Chemistry-COSMETICS
Sophia Marie Verdeflor
 
7 elements of modern drama
7 elements of modern drama7 elements of modern drama
7 elements of modern drama
Ces Valdez
 
Sim branding patricia duran rocio quintero orlando 2014 english version final...
Sim branding patricia duran rocio quintero orlando 2014 english version final...Sim branding patricia duran rocio quintero orlando 2014 english version final...
Sim branding patricia duran rocio quintero orlando 2014 english version final...
Universidad Técnica de Manabí
 
Elements of Drama
Elements of DramaElements of Drama
Elements of Drama
Eric Cabrera
 
Elements of drama
Elements of dramaElements of drama
Elements of drama
Lina Ell
 

Viewers also liked (12)

OpenWF 1.0 Composition Reference Card
OpenWF 1.0 Composition Reference CardOpenWF 1.0 Composition Reference Card
OpenWF 1.0 Composition Reference Card
 
Social Studies Exam - Strategy & Revision Guide
Social Studies Exam - Strategy & Revision GuideSocial Studies Exam - Strategy & Revision Guide
Social Studies Exam - Strategy & Revision Guide
 
Elements of Drama
Elements of DramaElements of Drama
Elements of Drama
 
Elements of Drama
Elements of DramaElements of Drama
Elements of Drama
 
OpenCL 2.0 Reference Card
OpenCL 2.0 Reference CardOpenCL 2.0 Reference Card
OpenCL 2.0 Reference Card
 
Elements of drama
Elements of dramaElements of drama
Elements of drama
 
QTR - Gilbert
QTR - GilbertQTR - Gilbert
QTR - Gilbert
 
Strategic Intervention Material (SIM) Chemistry-COSMETICS
Strategic Intervention Material (SIM) Chemistry-COSMETICSStrategic Intervention Material (SIM) Chemistry-COSMETICS
Strategic Intervention Material (SIM) Chemistry-COSMETICS
 
7 elements of modern drama
7 elements of modern drama7 elements of modern drama
7 elements of modern drama
 
Sim branding patricia duran rocio quintero orlando 2014 english version final...
Sim branding patricia duran rocio quintero orlando 2014 english version final...Sim branding patricia duran rocio quintero orlando 2014 english version final...
Sim branding patricia duran rocio quintero orlando 2014 english version final...
 
Elements of Drama
Elements of DramaElements of Drama
Elements of Drama
 
Elements of drama
Elements of dramaElements of drama
Elements of drama
 

Similar to Mod Perl Quick Reference Card

Programming in perl style
Programming in perl styleProgramming in perl style
Programming in perl style
Bo Hua Yang
 
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoIntroduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoMasahiro Nagano
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Kang-min Liu
 
PHP Conference Asia 2016
PHP Conference Asia 2016PHP Conference Asia 2016
PHP Conference Asia 2016
Britta Alex
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
brian d foy
 
Writing Friendly libraries for CodeIgniter
Writing Friendly libraries for CodeIgniterWriting Friendly libraries for CodeIgniter
Writing Friendly libraries for CodeIgniterCodeIgniter Conference
 
SPL, not a bridge too far
SPL, not a bridge too farSPL, not a bridge too far
SPL, not a bridge too far
Michelangelo van Dam
 
Object Oriented Programming with PHP 5 - More OOP
Object Oriented Programming with PHP 5 - More OOPObject Oriented Programming with PHP 5 - More OOP
Object Oriented Programming with PHP 5 - More OOPWildan Maulana
 
Aura Project for PHP
Aura Project for PHPAura Project for PHP
Aura Project for PHPHari K T
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 
Php my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.netPhp my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.net
Programmer Blog
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Michael Wales
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Developmentjsmith92
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
Jeff Carouth
 
PHPSpec BDD for PHP
PHPSpec BDD for PHPPHPSpec BDD for PHP
PHPSpec BDD for PHP
Marcello Duarte
 
Php tips-and-tricks4128
Php tips-and-tricks4128Php tips-and-tricks4128
Php tips-and-tricks4128PrinceGuru MS
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
Curscatalyst
CurscatalystCurscatalyst
CurscatalystKar Juan
 
PHP tips and tricks
PHP tips and tricks PHP tips and tricks
PHP tips and tricks
Damien Seguy
 
Ae internals
Ae internalsAe internals
Ae internals
mnikolenko
 

Similar to Mod Perl Quick Reference Card (20)

Programming in perl style
Programming in perl styleProgramming in perl style
Programming in perl style
 
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoIntroduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
PHP Conference Asia 2016
PHP Conference Asia 2016PHP Conference Asia 2016
PHP Conference Asia 2016
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
 
Writing Friendly libraries for CodeIgniter
Writing Friendly libraries for CodeIgniterWriting Friendly libraries for CodeIgniter
Writing Friendly libraries for CodeIgniter
 
SPL, not a bridge too far
SPL, not a bridge too farSPL, not a bridge too far
SPL, not a bridge too far
 
Object Oriented Programming with PHP 5 - More OOP
Object Oriented Programming with PHP 5 - More OOPObject Oriented Programming with PHP 5 - More OOP
Object Oriented Programming with PHP 5 - More OOP
 
Aura Project for PHP
Aura Project for PHPAura Project for PHP
Aura Project for PHP
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Php my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.netPhp my sql - functions - arrays - tutorial - programmerblog.net
Php my sql - functions - arrays - tutorial - programmerblog.net
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Development
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
 
PHPSpec BDD for PHP
PHPSpec BDD for PHPPHPSpec BDD for PHP
PHPSpec BDD for PHP
 
Php tips-and-tricks4128
Php tips-and-tricks4128Php tips-and-tricks4128
Php tips-and-tricks4128
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Curscatalyst
CurscatalystCurscatalyst
Curscatalyst
 
PHP tips and tricks
PHP tips and tricks PHP tips and tricks
PHP tips and tricks
 
Ae internals
Ae internalsAe internals
Ae internals
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 

Mod Perl Quick Reference Card

  • 1.   mod perl Quick Reference Card $r->send_http_header( $content_type ); ¡ $aref = $r->get_handlers( $str ); Revision 1.0 for mod perl version 1.19 Server core functions Apache->httpd_conf( $str ); Andrew Ford refcards.com TM $r->chdir_file( $file ); $bool = $r->module( $name ); $r->child_terminate(); $bool = Apache->perl_hook( $name ); mod perl is an Apache module, created by Doug MacEachern, $r->post_connection( $code_ref ); that embeds a Perl interpreter within the server. It provides a Perl $r->hard_timeout( $msg ); $r->internal_redirect( $newplace ); $r->push_handlers( $str => $code_ref );   API to Apache and adds a number of Apache configuration direc- $r = Apache->request( $r ); ¡ tives. Scripts using mod perl should import the Apache module, $r->internal_redirect_handler( $newplace ); $bool = $r->is_initial_req(); $r->set_handlers( $str => $aref ); Apache::Constants, and other Apache:: modules. A reference to the request object (denoted below by $r) is passed to Perl handlers $bool = $r->is_main(); Apache::SubRequest class when they are invoked. $r->kill_timeout(); $subr = $r->lookup_uri($uri); $str = $r->location(); $subr = $r->lookup_file($filename); Client request methods $req = $r->last(); $rc = $subr->run(); $r = Apache->request(); $req = $r->main(); $str = $r->args(); # or %hash = ... Apache::Server class $req = $r->next();   $c = $r->connection # see Apache::Connection $str = $r->notes( $k ,$v ); # or $tab = $r->notes() ¡ $s = Apache->server # or $r->server $str = $r->content();   # or %hash = ... $req = $r->prev(); $bool = $s->is_virtual(); $str = $r->filename( $newval ); ¡ $r->register_cleanup( $code_ref ); $s->log_error(); $r->finfo();   $r->reset_timeout(); $aref = $s->names(); $str = $r->get_remote_host( $lookup_type ); ¡ $r->soft_timeout( $msg ); $s = $s->next(); # use Apache::Constants :remotehost tag     $num = $s->port(); $str = $r->subprocess_env( $k , $v ); ¡¡ $str = $s->server_admin(); $str = $r->get_remote_logname();   $str = $r->header_in( $hdr , $newval ); ¡ Server configuration methods $str = $s->server_hostname(); $str = $r->dir_config($k); #or $tab = $r->dir_config()   $bool = $r->header_only(); $num = $s->timeout( $newval ); ¡ $href = $r->headers_in(); # or %hash = ... $str = $r->document_root(); $s->warn();   $str = $r->get_server_name(); $str = $r->method( $newval ); ¡  Apache::Connection class $num = $r->method_number( $nv ); # use :methods tag ¡ $num = $r->get_server_port();   $str = $r->server_root_relative( $obj ); ¡ $bool = $c->aborted(); $u = $r->parsed_uri();   # see Apache::URI $str = $c->auth_type(); $str = $r->path_info( $newval ); ¡ Logging and the Apache::Log class $addr = $c->local_addr(); $str = $r->protocol(); $str = $r->as_string();     $addr = $c->remote_addr( $addr ); ¡ $bool = $r->proxyreq( $newval ); ¡ $r->log_reason( $message, $file ); $str = $c->remote_host(); $r->read( $buf, $bytes_to_read ); $r->log_error( $message );   $str = $c->remote_ip( $ip ); ¡ $s = $r->server # see Apache::Server $r->warn( $message ); $str = $c->remote_logname(); $str = $r->the_request(); $log = $r->log();     $log = $s->log(); $str = $c->user( $username ); ¡ $str = $r->uri( $newval ); ¡ $log->emerg ( $str ... $code_ref ); ¢ £ ¤ Apache::Table class Server response methods   $log->alert ( $msg ... $code_ref ); ¢ £ ¤ $tab = Apache::Table->new( $r , $size ); ¡ $num = $r->bytes_sent();   $tab->add( $key, $str_or_aref ); $r->cgi_header_out( $hdr , $newval ); ¡ $log->crit ( $msg ... $code_ref ); ¢ £ ¤   $log->error ( $msg ... $code_ref ); ¢ £ ¤ $tab->clear(); $str = $r->content_encoding( $newval );   ¡ $tab->do( $code_ref ); $aref = $r->content_languages( $newval ); ¡ $log->warn ( $msg ... $code_ref ); ¢ £ ¤ $tab->merge( $key, $str_or_aref );   $log->notice( $msg ... $code_ref ); ¢ £ ¤ $tab->set( $key, $str ); $str = $r->content_type( $newval ); ¡ $r->custom_response( $code, $uri ); $log->info ( $msg ... $code_ref ); ¢ £ ¤ $str = $tab->get( $key ); # or @list = ...   $log->debug ( $msg ... $code_ref ); ¢ £ ¤ $tab->unset($key); $str = $r->err_header_out( $hdr , $newval ); ¡ $href = $r->err_headers_out();   # or %hash = ... Access control methods Apache::URI class   $str = $r->handler( $newval );  ¡ $opts = $r->allow_options();   # use :options tag $uri = Apache::URI->parse( $r , $string_uri ); ¡ $str = $r->header_out( $hdr , $newval ); ¡ $str = $r->auth_name( $newval ); ¡ $str = $uri->unparse();   $href = $r->headers_out();   # or %hash = ... $str = $r->auth_type(); $str = $uri->component( $newval ); ¡ $bool = $r->no_cache( $newval ); ¡ ($rc, $pw) = $r->get_basic_auth_pw(); (where component is one of: fragment, hostinfo, hostname, $num = $r->request_time();   $r->note_basic_auth_failure(); password, path_info, path, port, query, rpath, scheme, user) $num = $r->status( $newval ); ¡   $aref = $r->requires(); Apache::Util class $str = $r->status_line( $newval ); ¡ $flag = $r->satisfies(); # use :satisfies tag $str = Apache::Util::escape_html( $html ); Sending data to the client $bool = $r->some_auth_required(); $str = Apache::Util::escape_uri( $uri ); mod_perl specific methods     $r->print( @list ); # checks $| $str = Apache::Util::ht_time($time , $fmt , $bool ); ¡¡ $r->printf( $format, @args ); $str = $r->current_callback(); $secs = Apache::Util::parsedate( $date_str ); $r->rflush(); $bool = $r->define( $name );   $num = Apache::Util::size_string( $num ); $r->send_cgi_header( $str ); Apache->exit( $code ); ¡ $str = Apache::Util::unescape_uri( $uri ); $len = $r->send_fd( $filehandle ); $fh = Apache->gensym(); $str = Apache::Util::unescape_uri_info( $uri ); 1 2 3
  • 2. Apache::Constants class HTTP 1.1 headers Apache mod perl configuration directives The following export tag groups are defined (HTTP status code mod perl enables Apache to be configured using Perl statements synonyms are given in brackets): that are contained within <Perl>. . . </Perl> sections and adds the Apache configuration directives listed below. Each directive is :common : OK, DECLINED , DONE, NOT_FOUND , FORBIDDEN , Syntax Category given with its arguments; defaults are given where appropriate in AUTH_REQUIRED (HTTP_UNAUTHORIZED ), SERVER_ERROR Accept: media-types ;q=qvalue , ... ¥ ¦ ¥ §¦ REQUEST parentheses at the end of the line, followed by the symbol y to Accept-Charset: charset ;q=qvalue , ... ¥ ¥ §¦ ¦ REQUEST mark directives only valid in a directory section or .htaccess file. :response : DOCUMENT_FOLLOWS (HTTP_OK ), Accept-Encoding: encoding ;q=qvalue , ... ¥ ¥§¦ ¦ REQUEST MOVED (HTTP_MOVED_PERMANENTLY), Accept-Language: lang ;q=qvalue , ... ¥ ¦ ¥¨¦ REQUEST PerlAccessHandler handler REDIRECT (HTTP_MOVED_TEMPORARILY), Accept-Ranges: bytes none © RESPONSE PerlAuthenHandler handler USE_LOCAL_COPY (HTTP_NOT_MODIFIED ), Age: seconds RESPONSE PerlAuthzHandler handler BAD_REQUEST , BAD_GATEWAY , NOT_IMPLEMENTED , Allow: method , ... ¥ ¦ ENTITY CONTINUE , NOT_AUTHORITATIVE PerlChildExitHandler handler y Authorization: scheme credentials REQUEST PerlChildInitHandler handler y :methods : M_CONNECT , M_COPY, M_DELETE , M_GET, M_INVALID , Cache-Control: directive GENERAL PerlCleanupHandler handler M_LOCK, M_MKCOL , M_MOVE, M_OPTIONS , M_PATCH , M_POST, Connection: close GENERAL Content-Base: uri PerlDispatchHandler handler M_PROPFIND , M_PROPPATCH , M_PUT, M_TRACE , M_UNLOCK , METHODS ENTITY PerlFixupHandler handler Content-Encoding: enc ENTITY :options : OPT_ALL OPT_NONE , OPT_INDEXES , OPT_INCLUDES , Content-Language: lang ENTITY PerlFreshRestart On Off ¢ £ ¤ (On) y OPT_SYM_LINKS , OPT_EXECCGI , OPT_UNSET , Content-Length: len ENTITY PerlHandler handler OPT_INCNOEXEC , OPT_SYM_OWNER , OPT_MULTI , Content-MD5: digest ENTITY PerlHeaderParserHandler handler Content-Range: bytes range/length ENTITY PerlInitHandler handler :satisfies : SATISFY_ALL , SATISFY_ANY , SATISFY_NOSPEC PerlLogHandler handler Content-Type: media-type ENTITY :server : MODULE_MAGIC_NUMBER , SERVER_BUILT , SERVER_VERSION Cookie: name=value ; ... ¥ ¦ REQUEST PerlModule Date: date GENERAL PerlPassEnv name ... y :remotehost : REMOTE_HOST , REMOTE_NAME , REMOTE_NOLOOKUP , ETag: entity-tag RESPONSE PerlPostReadRequestHandler handler y REMOTE_DOUBLE_REV Expect: expectation REQUEST PerlRequire script-file Expires: date ENTITY PerlSendHeader On Off ¢ £ ¤ (Off) :http includes only those HTTP status code constants shown below in PerlSetEnv name value bold type (other HTTP constants may be imported explicitly): From: email-address REQUEST Host: hostname :port ¥ ¦ REQUEST PerlSetVar name value 100 HTTP_CONTINUE 405 HTTP_METHOD_NOT_ALLOWED PerlSetupEnv On Off ¢ £ ¤ (Off) If-Match: entity-tag REQUEST 101 HTTP_SWITCHING_PROTOCOLS 406 HTTP_NOT_ACCEPTABLE If-Modified-Since: date REQUEST PerlTaintCheck On Off ¢ £ ¤ (Off) y 200 HTTP_OK 407 HTTP_PROXY_AUTHENTICATION_ If-None-Match: entity-tag REQUEST PerlTransHandler handler y 201 HTTP_CREATED REQUIRED If-Range: entity tag date © REQUEST PerlTypeHandler handler 202 HTTP_ACCEPTED 408 HTTP_REQUEST_TIMEOUT 203 HTTP_NON_AUTHORITATIVE 409 HTTP_CONFLICT If-Unmodified-Since: date REQUEST PerlWarn On Off ¢ £ ¤ (Off) y Last-Modified: date ENTITY 204 HTTP_NO_CONTENT 410 HTTP_GONE Location: uri RESPONSE Resources 205 HTTP_RESET_CONTENT 411 HTTP_LENGTH REQUIRED MIME-Version: version GENERAL http://perl.apache.org The Apache/Perl Integration Project 206 HTTP_PARTIAL_CONTENT 412 HTTP_PRECONDITION_FAILED Max-Forwards: number REQUEST http://www.modperl.com Writing Apache Modules home page 300 HTTP_MULTIPLE_CHOICES 413 HTTP_REQUEST_ENTITY_TOO_LARGE Pragma: no-cache extension-pragma © GENERAL http://www.apache.org Apache home page 301 HTTP_MOVED_PERMANENTLY 414 HTTP_REQUEST_URI_TOO_LARGE Proxy-Authenticate: challenge RESPONSE 302 HTTP_MOVED_TEMPORARILY 415 HTTP_UNSUPPORTED_MEDIA_TYPE http://www.perl.com Perl home page Proxy-Authorization: credentials REQUEST 303 HTTP_SEE_OTHER 500 HTTP_INTERNAL_SERVER_ERROR http://www.refcards.com Quick reference cards Public: method ... RESPONSE 304 HTTP_NOT_MODIFIED 501 HTTP_NOT IMPLEMENTED Range: bytes=n -m , ... ¥¨¦ ¥ ¦ REQUEST 305 HTTP_USE_PROXY 502 HTTP_BAD_GATEWAY Referer: url REQUEST 400 HTTP_BAD_REQUEST 503 HTTP_SERVICE_UNAVAILABLE mod perl Quick Reference Card Retry-After: date seconds © RESPONSE 401 HTTP_UNAUTHORIZED 504 HTTP_GATEWAY_TIME_OUT A refcards.com TM quick reference card Server: string RESPONSE 402 HTTP_PAYMENT_REQUIRED 505 HTTP_VERSION_NOT_SUPPORTED Revision 1.0 for mod perl version 1.19 [May 1999] Set-Cookie: name=value ; options ¥ ¦ RESPONSE 403 HTTP_FORBIDDEN 506 HTTP_VARIANT_ALSO_VARIES c 1998, 1999 Ford Mason Ltd. All rights reserved. TE: coding REQUEST 404 HTTP_NOT_FOUND Trailer: header GENERAL Permission is granted to print and duplicate this card for personal or in- Transfer-Encoding: coding GENERAL dividual, internal business use. Copies of this card ( others) can be or- Magic global variables Upgrade: protocol , ... ¥ ¦ GENERAL dered through our web site: http://www.refcards.com, which also has $0, $^X, $|, $/, %@, %SIG, @INC, %INC, %ENV{MOD_PERL} , User-Agent: string REQUEST versions available for downloading. %ENV{GATEWAY_INTERFACE}, %ENV{PERL_SEND_HEADER} Vary: header , ... ¥ ¦ RESPONSE Please send feedback to: feedback@refcards.com Special package globals Via: protocol/ version (comment) , ... ¥ ¦ ¥ ¥ ¨¦ ¦ GENERAL refcards.com is a trademark of Ford Mason Ltd. $Apache::Server::CWD $Apache::Server::SaveConfig WWW-Authenticate: scheme realm RESPONSE Use of the Camel for Perl is a trademark of O’Reilly Associates – used by permis- $Apache::Server::ReStarting $Apache::Server::Starting Warning: code agent quot;textquot; date ¥ ¦ GENERAL sion. 4 5 6