add a patch from Niko Tyni avoiding two warnings about use of uninitialized
authorDamyan Ivanov <dmn@debian.org>
Tue, 20 Apr 2010 19:16:31 +0000 (19:16 +0000)
committerDamyan Ivanov <dmn@debian.org>
Tue, 20 Apr 2010 19:16:31 +0000 (19:16 +0000)
values, which break tests under Perl 5.12. (Closes: #578481)

debian/changelog
debian/patches/110-Fix-two-uninitialized-value-warnings-triggered-with-.patch [new file with mode: 0644]
debian/patches/series

index 8007204..dc87008 100644 (file)
@@ -1,6 +1,8 @@
 libapache2-mod-perl2 (2.0.4-7) UNRELEASED; urgency=low
 
   * change source Section to 'httpd'
+  * add a patch from Niko Tyni avoiding two warnings about use of uninitialized
+    values, which break tests under Perl 5.12. (Closes: #578481)
 
  -- Damyan Ivanov <dmn@debian.org>  Mon, 01 Feb 2010 07:22:55 +0200
 
diff --git a/debian/patches/110-Fix-two-uninitialized-value-warnings-triggered-with-.patch b/debian/patches/110-Fix-two-uninitialized-value-warnings-triggered-with-.patch
new file mode 100644 (file)
index 0000000..603111a
--- /dev/null
@@ -0,0 +1,34 @@
+From d8e544ba57806daa88035fa75ea8e6acd7c9dc6a Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni@debian.org>
+Date: Tue, 20 Apr 2010 10:10:09 +0300
+Subject: [PATCH] Fix two uninitialized value warnings triggered with Perl 5.12.0
+
+Perl 5.12.0 has new uninitialized value warnings for the various
+lc* and uc* functions. These break the test suite:
+
+ Failed test 14 in t/modules/apache_status.t at line 47
+ Failed test 15 in t/modules/apache_status.t at line 47 fail #2
+
+so short-circuit the variables to the empty string.
+---
+ lib/Apache2/Status.pm |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Apache2/Status.pm b/lib/Apache2/Status.pm
+index 288531a..8bbebdb 100644
+--- a/lib/Apache2/Status.pm
++++ b/lib/Apache2/Status.pm
+@@ -95,8 +95,8 @@ sub install_hint {
+ sub status_config {
+     my ($r, $key) = @_;
+-    return (lc($r->dir_config($key)) eq "on") ||
+-        (lc($r->dir_config('StatusOptionsAll')) eq "on");
++    return (lc($r->dir_config($key) || "") eq "on") ||
++        (lc($r->dir_config('StatusOptionsAll') || "") eq "on");
+ }
+ sub menu_item {
+-- 
+1.7.0.4
+
index 74823b0..dcfe685 100644 (file)
@@ -8,3 +8,4 @@
 031-test-extra-args.patch
 035-testrequest_add_credentials.patch
 100-svn-XSS-Status.patch
+110-Fix-two-uninitialized-value-warnings-triggered-with-.patch