User Tools

Site Tools


kurs:mod_perl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:mod_perl [2014/09/10 21:22] (current)
Line 1: Line 1:
 +===== Installation =====
 +
 +http.conf: ​
 +
 +<​code>​
 +
 +LoadModule perl_module ​                   /​usr/​lib/​apache2/​mod_perl.so
 +## PerlRequire /​home//​startup.pl
 +
 +<​Location /​print_env1>​
 +        SetHandler perl-script
 +        #​PerlHandler Apache2::​SOAP
 +        #PerlSetVar dispatch_to Data::​Conveyor::​App::​SOAP
 +        PerlResponseHandler MyApache2::​PrintEnv1
 +</​Location>​
 +
 + ​file:​MyApache2/​PrintEnv1.pm
 +  -----------------------
 +  package MyApache2::​PrintEnv1;​
 +  use strict;
 +  ​
 +  use Apache2::​RequestRec (); # for $r->​content_type
 +  use Apache2::​RequestIO ();  # for print
 +  use Apache2::​Const -compile => ':​common';​
 +  ​
 +  sub handler {
 +      my $r = shift;
 +  ​
 +      $r->​content_type('​text/​plain'​);​
 +      for (sort keys %ENV){
 +          print "$_ => $ENV{$_}\n";​
 +      }
 +  ​
 +      return Apache2::​Const::​OK;​
 +  }
 +  ​
 +  1;
 +</​code>​
 +
 +
 +http://​perl.apache.org/​docs/​2.0/​user/​config/​config.html#​Enabling_mod_perl
 +
 +== Immer ein Template System verwenden! ==
 +
 +http://​perl.apache.org/​docs/​tutorials/​tmpl/​comparison/​comparison.html
 +
 +
 +
 +
 +
 +
  
kurs/mod_perl.txt ยท Last modified: 2014/09/10 21:22 (external edit)