File: silence_test_warnings.patch

package info (click to toggle)
libapache-asp-perl 2.62-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,432 kB
  • ctags: 875
  • sloc: perl: 6,033; php: 417; sh: 65; lisp: 22; makefile: 10
file content (16 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: fix "uninitialized value $rv" warnings during tests
 ...apparently, ASP usually runs without warnings enabled...
Author: Florian Schlichting <fschlich@zedat.fu-berlin.de>
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=75617

--- a/ASP.pm
+++ b/ASP.pm
@@ -2015,7 +2015,7 @@
 
 sub get_dir_config {
     my $rv = shift->get(shift);
-    if(lc($rv) eq 'off') {
+    if(defined($rv) && lc($rv) eq 'off') {
 	$rv = 0; # Off always becomes 0
     }
     $rv;