stas 02/05/19 02:41:39 Modified: src/docs/2.0/api/ModPerl-Registry/ModPerl PerlRun.pod Registry.pod RegistryBB.pod RegistryCooker.pod RegistryNG.pod Log: start documenting the registry family Revision Changes Path 1.2 +2 -0 modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/PerlRun.pod Index: PerlRun.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/PerlRun.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PerlRun.pod 13 Nov 2001 04:50:58 -0000 1.1 +++ PerlRun.pod 19 May 2002 09:41:39 -0000 1.2 @@ -15,3 +15,5 @@ =head1 SEE ALSO ModPerl::RegistryCooker(3), Apache(3), mod_perl(3) + +=cut 1.2 +107 -7 modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/Registry.pod Index: Registry.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/Registry.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Registry.pod 13 Nov 2001 04:50:58 -0000 1.1 +++ Registry.pod 19 May 2002 09:41:39 -0000 1.2 @@ -2,16 +2,116 @@ ModPerl::Registry - Run unaltered CGI scripts persistently under mod_perl -=head1 SYNOPSIS +=head1 Synopsis -=head1 DESCRIPTION + # httpd.conf + PerlModule ModPerl::Registry + Alias /perl/ /home/httpd/perl/ + <Location /perl> + SetHandler perl-script + PerlResponseHandler ModPerl::Registry + #PerlOptions +ParseHeaders + #PerlOptions +GlobalRequest + Options +ExecCGI + </Location> -=head1 AUTHORS +=head1 Description -Doug MacEachern +URIs in the form of C<http://example.com/perl/test.pl> will be +compiled as the body of a Perl subroutine and executed. Each child +process will compile the subroutine once and store it in memory. It +will recompile it whenever the file (e.g. I<test.pl> in our example) +is updated on disk. Think of it as an object oriented server with +each script implementing a class loaded at runtime. -Stas Bekman +The file looks much like a "normal" script, but it is compiled into a +subroutine. -=head1 SEE ALSO +For example: -ModPerl::RegistryCooker(3), Apache(3), mod_perl(3) + my $r = Apache->request; + $r->content_type("text/html"); + $r->send_http_header; + $r->print("mod_perl rules!"); + +XXX: STOPPED here + +This module emulates the CGI environment, allowing programmers to +write scripts that run under CGI or mod_perl without change. Existing +CGI scripts may require some changes, simply because a CGI script has +a very short lifetime of one HTTP request, allowing you to get away +with "quick and dirty" scripting. Using mod_perl and Apache::Registry +requires you to be more careful, but it also gives new meaning to the +word "quick"! + +Be sure to read all mod_perl related documentation for more details, +including instructions for setting up an environment that looks +exactly like CGI: + + print "Content-type: text/html\n\n"; + print "Hi There!"; + +Note that each httpd process or "child" must compile each script once, +so the first request to one server may seem slow, but each request +there after will be faster. If your scripts are large and/or make use +of many Perl modules, this difference should be noticeable to the +human eye. + +=head1 SECURITY + +Apache::Registry::handler will preform the same checks as mod_cgi +before running the script. + +=head1 ENVIRONMENT + +The Apache function `exit' overrides the Perl core built-in function. + +The environment variable B<GATEWAY_INTERFACE> is set to C<CGI-Perl/1.1>. + +=head1 COMMANDLINE SWITCHES IN FIRST LINE + +Normally when a Perl script is run from the command line or under CGI, +arguments on the `#!' line are passed to the perl interpreter for processing. + +Apache::Registry currently only honors the B<-w> switch and will turn +on warnings using the C<$^W> global variable. Another common switch +used with CGI scripts is B<-T> to turn on taint checking. This can +only be enabled when the server starts with the configuration +directive: + + PerlTaintCheck On + +However, if taint checking is not enabled, but the B<-T> switch is seen, +Apache::Registry will write a warning to the error_log. + +=head1 DEBUGGING + +You may set the debug level with the $Apache::Registry::Debug bitmask + + 1 => log recompile in errorlog + 2 => Apache::Debug::dump in case of $@ + 4 => trace pedantically + +=head1 CAVEATS + +Apache::Registry makes things look just the CGI environment, however, you +must understand that this *is not CGI*. Each httpd child will compile +your script into memory and keep it there, whereas CGI will run it once, +cleaning out the entire process space. Many times you have heard +"always use C<-w>, always use C<-w> and 'use strict'". +This is more important here than anywhere else! + +Your scripts cannot contain the __END__ or __DATA__ token to terminate +compilation. + + +=head1 Authors + +Andreas J. Koenig, Doug MacEachern and Stas Bekman. + +=head1 See Also + +C<L<ModPerl::RegistryCooker>>, C<L<ModPerl::RegistryBB>>, +C<L<ModPerl::PerlRun>>, Apache(3), mod_perl(3) + +=cut 1.2 +24 -5 modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/RegistryBB.pod Index: RegistryBB.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/RegistryBB.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RegistryBB.pod 13 Nov 2001 04:50:58 -0000 1.1 +++ RegistryBB.pod 19 May 2002 09:41:39 -0000 1.2 @@ -2,17 +2,36 @@ ModPerl::RegistryBB - Run unaltered CGI scripts persistently under mod_perl -=head1 SYNOPSIS +=head1 Synopsis -=head1 DESCRIPTION + # httpd.conf + PerlModule ModPerl::RegistryBB + Alias /perl/ /home/httpd/perl/ + <Location /perl> + SetHandler perl-script + PerlResponseHandler ModPerl::RegistryBB + #PerlOptions +ParseHeaders + #PerlOptions +GlobalRequest + Options +ExecCGI + </Location> + +=head1 Description + +C<ModPerl::RegistryBB> is similar to C<L<ModPerl::Registry>>, but does +the bare minimum (mnemonic: BB = Bare Bones) to compile a script file +once and run it many times, in order to get the maximum +performance. Whereas C<L<ModPerl::Registry>> does various checks, +which add a slight overhead to response times. -=head1 AUTHORS +=head1 Authors Doug MacEachern Stas Bekman -=head1 SEE ALSO +=head1 See Also -ModPerl::RegistryCooker(3), Apache(3), mod_perl(3) +C<L<ModPerl::RegistryCooker>>, C<L<ModPerl::Registry>>, Apache(3), +mod_perl(3) +=cut 1.2 +9 -6 modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/RegistryCooker.pod Index: RegistryCooker.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/RegistryCooker.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RegistryCooker.pod 13 Nov 2001 04:50:58 -0000 1.1 +++ RegistryCooker.pod 19 May 2002 09:41:39 -0000 1.2 @@ -1,17 +1,20 @@ =head1 NAME -ModPerl::RegistryCooker - Cook mod_perl Registry Modules +ModPerl::RegistryCooker - Cook mod_perl 2.0 Registry Modules -=head1 SYNOPSIS +=head1 Synopsis -=head1 DESCRIPTION +=head1 Description -=head1 AUTHORS +=head1 Authors Doug MacEachern Stas Bekman -=head1 SEE ALSO +=head1 See Also -ModPerl::Registry(3), Apache(3), mod_perl(3) +C<L<ModPerl::Registry>>, C<L<ModPerl::RegistryBB>>, +C<L<ModPerl::PerlRun>>, Apache(3), mod_perl(3) + +=cut 1.2 +9 -6 modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/RegistryNG.pod Index: RegistryNG.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/ModPerl-Registry/ModPerl/RegistryNG.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RegistryNG.pod 13 Nov 2001 04:50:58 -0000 1.1 +++ RegistryNG.pod 19 May 2002 09:41:39 -0000 1.2 @@ -2,19 +2,22 @@ ModPerl::RegistryNG - Run unaltered CGI scripts persistently under mod_perl -=head1 SYNOPSIS +=head1 Synopsis -=head1 DESCRIPTION +=head1 Description This modules is just a back compatibility alias. Use -C<ModPerl::Registry> instead. +C<L<ModPerl::Registry>> instead. -=head1 AUTHORS +=head1 Authors Doug MacEachern Stas Bekman -=head1 SEE ALSO +=head1 See Also -ModPerl::RegistryCooker(3), Apache(3), mod_perl(3) +C<L<ModPerl::RegistryCooker>>, C<L<ModPerl::Registry>>, Apache(3), +mod_perl(3) + +=cut
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]