Subject: | [PATCH] avoid "use of uninitialized values" warning |
Hi!
Here is a little fix that avoids said warnings when the LocationMatch
contains a non trivial regex that cannot be mapped to a unambiguous
path and therefore the base_path keeps empty.
A deliberate use of such LocationMatch regexes is explained in Catalyst
Calendar
http://catalyst.perl.org/calendar/2007/17
section "Application base".
Thanks and regards,
Steffen
--
Steffen Schwigon <schwigon@webit.de>
Dresden Perl Mongers <http://dresden-pm.org/>
Deutscher Perl-Workshop <http://www.perl-workshop.de/>
Subject: | fix_uninitialized_values_warning.patch |
--- Apache.pm.orig 2008-01-08 08:45:00.000000000 +0100
+++ Apache.pm 2008-01-08 08:31:15.000000000 +0100
@@ -139,7 +139,7 @@
my $match = qr/($base_path)/;
my ($base_match) = $path =~ $match;
- $base_path = $base_match;
+ $base_path = $base_match || '';
}
# Strip leading slash