diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2008-11-06 01:10:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-06 16:39:13 -0800 |
commit | dde80d9c23e10592817f0c81e32a99a889a9bb8e (patch) | |
tree | 26dd30445eeb6b633e99b767e497d5225258b193 /arm | |
parent | gitweb: Add a per-repository authorization hook. (diff) | |
download | tgif-dde80d9c23e10592817f0c81e32a99a889a9bb8e.tar.xz |
gitweb: Fix mod_perl support.
ModPerl::Registry precompiles scripts by wrapping them
in a subroutine. This causes ordinary subroutines of the
script to become nested, and warnings appear:
gitweb.cgi: Variable "$path_info" will not stay shared
This warning means that $path_info was declared as 'my',
and thus according to the perl evaluation rules all nested
subroutines will retain a reference to the instance of the
variable used in the first invocation of the master script.
When the script (i.e. the master meta-subroutine) is executed
the second time, it will use a new instance, so the logic
breaks. To avoid this it is necessary to declare all global
variables as 'our', which places them at the package level.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'arm')
0 files changed, 0 insertions, 0 deletions