﻿ Perl Guide  JavaScript EditorFree JavaScript Editor     Free
JavaScript Scripts ﻿  Main Page Previous Section Next Section
6.4 Perl Specifics in the mod_perl Environment  In the following
sections, we discuss the specifics of Perl's behavior under
mod_perl.  6.4.1 exit( )  Perl's core exit( ) function shouldn't
be used in mod_perl code. Calling it causes the mod_perl process
to exit, which defeats the purpose of using mod_perl. The
Apache::exit( ) function should be used instead. Starting with
Perl Version 5.6.0, mod_perl overrides exit( ) behind the scenes
using CORE::GLOBAL::, a new magical package.  The CORE:: Package
CORE:: is a special package that provides access to Perl's
built-in functions. You may need to use this package to override
some of the built-in functions. For example, if you want to
override the exit( ) built-in function, you can do so with:  use
subs qw(exit); exit( ) if $DEBUG; sub exit { warn "exit( ) was
called"; }  Now when you call exit( ) in the same scope in which
it was overrid