Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
540d08b4
Commit
540d08b4
authored
Sep 16, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 510958: Allow hooks to exit() under mod_perl
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
parent
2d952ffa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
Hook.pm
Bugzilla/Hook.pm
+24
-3
No files found.
Bugzilla/Hook.pm
View file @
540d08b4
...
...
@@ -21,12 +21,25 @@
#
package
Bugzilla::
Hook
;
use
strict
;
use
Bugzilla::
Constants
;
use
Bugzilla::
Util
;
use
Bugzilla::
Error
;
use
strict
;
use
Scalar::
Util
qw(blessed)
;
BEGIN
{
if
(
$ENV
{
MOD_PERL
})
{
require
ModPerl::
Const
;
import
ModPerl::
Const
-
compile
=>
'EXIT'
;
}
else
{
# Create a fake constant. We have to do this in a string eval,
# otherwise this will always be defined.
eval
(
'sub ModPerl::EXIT;'
);
}
}
sub
process
{
my
(
$name
,
$args
)
=
@_
;
...
...
@@ -49,8 +62,16 @@ sub process {
# Allow extensions to load their own libraries.
local
@INC
=
(
"$extension/lib"
,
@INC
);
do
(
$extension
.
'/code/'
.
$name
.
'.pl'
);
ThrowCodeError
(
'extension_invalid'
,
{
errstr
=>
$@
,
name
=>
$name
,
extension
=>
$extension
})
if
$@
;
if
(
$@
)
{
if
(
$ENV
{
MOD_PERL
}
and
blessed
$@
and
$@
==
ModPerl::
EXIT
)
{
exit
;
}
else
{
ThrowCodeError
(
'extension_invalid'
,
{
errstr
=>
$@
,
name
=>
$name
,
extension
=>
$extension
});
}
}
# Flush stored data.
Bugzilla
->
hook_args
({});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment