NAME
ModPerl::Global - Perl API for manipulating special Perl lists
SSyynnooppssiissuse ModPerl::Global ();
my $package = 'MyApache2::Package';
# make the END blocks of this package special
ModPerl::Global::speciallistregister(END => $package);
# Execute all encoutered END blocks from this package now
ModPerl::Global::speciallistcall( END => $package);
# delete the list of END blocks
ModPerl::Global::speciallistclear( END => $package);
DDeessccrriippttiioonn"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 modperl and not given to Perl. "speciallistregister" does that. Later on when you want to execute the special blocks, "speciallistcall" should be called. Unless you want to call the list more than once, clear the list with "speciallistclear". AAPPII"ModPerl::Global" provides the following methods:
""ssppeecciiaalllliissttccaallll"" Call the special list$ok = speciallistcall($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 forret: $ok ( boolean )
true value if $key is known, false otherwise.
since: 2.0.00 ""ssppeecciiaalllliissttcclleeaarr"" Clear the special list$ok = speciallistclear($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 forret: $ok ( boolean )
true value if $key is known, false otherwise.
since: 2.0.00 ""ssppeecciiaalllliissttrreeggiisstteerr"" Register the special list$ok = speciallistcall($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 forret: $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. SSeeee AAllssoo modperl 2.0 documentation. CCooppyyrriigghhtt modperl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. AAuutthhoorrss The modperl development team and numerous contributors.perl v5.8a.p8achemodperl-101.1~2::m2o0d05p-e1r0l-220.0.2::docs::api::ModPerl::Global(3)