Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

modperl::global(3) [osx man page]

apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::ModPUser:Contributed Perapache_mod_perl-108~358::mod_perl-2.0.7::docs::api::ModPerl::Global(3)

NAME
ModPerl::Global -- Perl API for manipulating special Perl lists Synopsis use ModPerl::Global (); my $package = 'MyApache2::Package'; # make the END blocks of this package special ModPerl::Global::special_list_register(END => $package); # Execute all encoutered END blocks from this package now ModPerl::Global::special_list_call( END => $package); # delete the list of END blocks ModPerl::Global::special_list_clear( END => $package); Description "ModPerl::Global" provides an API to manipulate special perl lists. At the moment only the "END" blocks list is supported. This API allows you to change the normal Perl behavior, and execute special lists when you need to. For example "ModPerl::RegistryCooker" uses it to run "END" blocks in the scripts at the end of each request. Before loading a module containing package $package, you need to register it, so the special blocks will be intercepted by mod_perl and not given to Perl. "special_list_register" does that. Later on when you want to execute the special blocks, "special_list_call" should be called. Unless you want to call the list more than once, clear the list with "special_list_clear". API
"ModPerl::Global" provides the following methods: "special_list_call" Call the special list $ok = special_list_call($key => $package); arg1: $key ( string ) The name of the special list. At the moment only 'END' is supported. arg2: $package ( string ) what package to special list is for ret: $ok ( boolean ) true value if $key is known, false otherwise. since: 2.0.00 "special_list_clear" Clear the special list $ok = special_list_clear($key => $package); arg1: $key ( string ) The name of the special list. At the moment only 'END' is supported. arg2: $package ( string ) what package to special list is for ret: $ok ( boolean ) true value if $key is known, false otherwise. since: 2.0.00 "special_list_register" Register the special list $ok = special_list_call($key => $package); arg1: $key ( string ) The name of the special list. At the moment only 'END' is supported. arg2: $package ( string ) what package to special list is for ret: $ok ( boolean ) true value if $key is known, false otherwise. since: 2.0.00 Notice that you need to register the package before it is loaded. If you register it after, Perl has already compiled the "END" blocks and there are no longer under your control. See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.16.2 2011-02-apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::ModPerl::Global(3)

Check Out this Related Man Page

libapache2-mod-perl2-2.0.7::docs::api::ModPerl::PerlRun(User Contributed Perl Documentlibapache2-mod-perl2-2.0.7::docs::api::ModPerl::PerlRun(3pm)

NAME
ModPerl::PerlRun - Run unaltered CGI scripts under mod_perl Synopsis # httpd.conf PerlModule ModPerl::PerlRun Alias /perl-run/ /home/httpd/perl/ <Location /perl-run> SetHandler perl-script PerlResponseHandler ModPerl::PerlRun PerlOptions +ParseHeaders Options +ExecCGI </Location> Description META: document that for now we don't chdir() into the script's dir, because it affects the whole process under threads. "ModPerl::PerlRunPrefork" should be used by those who run only under prefork MPM. Special Blocks "BEGIN" Blocks When running under the "ModPerl::PerlRun" handler "BEGIN" blocks behave as follows: o "BEGIN" blocks defined in scripts running under the "ModPerl::PerlRun" handler are executed on each and every request. o "BEGIN" blocks defined in modules loaded from scripts running under "ModPerl::PerlRun" (and which weren't already loaded prior to the request) are executed on each and every request only if those modules declare no package. If a package is declared "BEGIN" blocks will be run only the first time each module is loaded, since those modules don't get reloaded on subsequent requests. See also "BEGIN" blocks in mod_perl handlers. "CHECK" and "INIT" Blocks Same as normal mod_perl handlers. "END" Blocks Same as "ModPerl::Registry". Authors Doug MacEachern Stas Bekman See Also "ModPerl::RegistryCooker" and "ModPerl::Registry". perl v5.14.2 2011-02-08 libapache2-mod-perl2-2.0.7::docs::api::ModPerl::PerlRun(3pm)
Man Page