File: 01_apachehandler.patch

package info (click to toggle)
libhtml-mason-perl 1%3A1.44-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,112 kB
  • ctags: 1,651
  • sloc: perl: 17,877; sh: 187; makefile: 12
file content (48 lines) | stat: -rw-r--r-- 1,805 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Index: libhtml-mason-perl-1.35.obsolete.0.43890935306354/lib/HTML/Mason/ApacheHandler.pm
===================================================================
--- libhtml-mason-perl-1.35.obsolete.0.43890935306354.orig/lib/HTML/Mason/ApacheHandler.pm	2006-10-17 14:58:32.000000000 -0400
+++ libhtml-mason-perl-1.35.obsolete.0.43890935306354/lib/HTML/Mason/ApacheHandler.pm	2007-03-31 08:09:30.000000000 -0400
@@ -9,9 +9,6 @@
 
 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 @@
         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 @@
         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
@@ -599,7 +601,11 @@
     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');