This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to branch master
in repository libhtml-mason-perl.

commit ca649e5c795bd1480587bbd5cbc54783153822e2
Author: Florian Schlichting <f...@debian.org>
Date:   Sat Jul 9 17:10:59 2011 +0200

    fix $VERSION handling; use /var/cache/mason as default data_dir

Notes:
    Origin: vendor
    Patch-Name: 01_apachehandler.patch
---
 lib/HTML/Mason/ApacheHandler.pm | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/HTML/Mason/ApacheHandler.pm b/lib/HTML/Mason/ApacheHandler.pm
index 0843360..3a535ca 100644
--- a/lib/HTML/Mason/ApacheHandler.pm
+++ b/lib/HTML/Mason/ApacheHandler.pm
@@ -9,9 +9,6 @@ use warnings;
 
 package HTML::Mason::ApacheHandler;
 
-use vars qw($VERSION);
-# do not change the version number
-$VERSION = 1.69;
 
 
 # PerlAddVar was introduced in mod_perl-1.24
@@ -27,7 +24,7 @@ BEGIN
         require mod_perl;
     }
 
-    my $mpver = (mod_perl2->VERSION || mod_perl->VERSION || 0);
+    my $mpver = ($mod_perl2::VERSION || $mod_perl::VERSION || 0);
 
     # This is the version that introduced PerlAddVar
     if ($mpver && $mpver < 1.24)
@@ -270,6 +267,11 @@ if ( $ENV{MOD_PERL} && ! APACHE2 )
         unless Apache::perl_hook('TableApi');
 }
 
+# CFRY: moved down from top of file in Debian (by a previous maintainer)
+use vars qw($VERSION);
+# do not change the version number
+$VERSION = 1.69;
+
 use base qw(HTML::Mason::Handler);
 
 BEGIN
@@ -598,7 +600,11 @@ sub new
     if (exists $allowed_params->{data_dir} and not exists $params{data_dir})
     {
         # constructs path to <server root>/mason
-        if (UNIVERSAL::can('Apache2::ServerUtil','server_root')) {
+        # CFRY: use /var/cache/mason as default data_dir on Debian
+        if (-d '/var/cache/mason') {
+            $defaults{data_dir} = '/var/cache/mason';
+        }
+        elsif (UNIVERSAL::can('Apache2::ServerUtil','server_root')) {
                 $defaults{data_dir} = 
File::Spec->catdir(Apache2::ServerUtil::server_root(),'mason');
         } else {
                 $defaults{data_dir} = Apache->server_root_relative('mason');

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libhtml-mason-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to