perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject [Patch mp2] Case-insensitive PerlOptions
Date Mon, 10 Jan 2005 20:44:09 GMT
Currently, PerlOptions takes case-sensitive options, (e.g. RegisterGlobal)
and any change in capitalization will not be recognized as a valid option.

Suggested patch makes it case-insensitive.

Index: lib/ModPerl/Code.pm
===================================================================
--- lib/ModPerl/Code.pm	(revision 124830)
+++ lib/ModPerl/Code.pm	(working copy)
@@ -451,7 +451,7 @@
                  if (/^(\w)/) {
                      my $gap = " " x ($max_len - length $_);
                      push @{ $switch{$1} },
-                        qq{if (strEQ(str, "$_"))$gap return $lookup{$_};};
+                        qq{if (0==strcasecmp(str, "$_"))$gap return $lookup{$_};};
                  }
              }


--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Mime
View raw message