httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Mattes ...@seid-online.de>
Subject Re: APXS troubles
Date Fri, 20 Jul 2007 09:51:18 GMT
On Fri, 2007-07-20 at 08:36 +0200, Mike wrote:
> > >         if ($f =~ m|\.c$|) {  <---------------- Here, bad coder! BAD!
> > I don't know perl at all, so those were
> > stabs in the dark. Any pointers on that would be appreciated.
> Try:
> if( $f =~ m/\.c$|\.cpp$|\.cc$/ )
> Kind regards.

I'd go for:

 if ( $f = ~m/\.c(c|pp){0,1}$/i )

This variant avoids backtracking  and makes the regexp case insensitive.
Yes, it does accept monsters like 'Foo.cPp'. but who cares :-)

 Cheers, RalfD

BTW - did anyone report this bug to the maintainers?

 


Mime
View raw message