perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [Patch mp2] Case-insensitive PerlOptions
Date Mon, 10 Jan 2005 21:37:51 GMT
Philippe M. Chiasson wrote:
> 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{$_};};
>                  }
>              }

-0:

while it's fine for startup code, it'll affect 
modperl_config_is_perl_option_enabled, that may be called at request time 
== slowdown. And that change may affect other things added in the future. 
I see nothing wrong with having the options case-sensitive.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message