Farokh Irani wrote:
> >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$/ )
>
> OK, I tried this and while it appears to compile and link, the symbol
> winds up undefined again and nm shows the a similar output as when it
> was linked as an empty library.
>
> >I'd go for:
> >
> > if ( $f = ~m/\.c(c|pp){0,1}$/i )
>
> This one doesn't compile. When I run apxs, perl complains:
> Use of uninitialized value in pattern match (m//) at /usr/bin/apxs2
> line
> 361.

There's a typo.  It should be:

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

J.
--
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+
  www: http://www.azazel.net/
  pgp: http://www.azazel.net/~azazel/js_key.asc
+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+

Attachment: signature.asc
Description: Digital signature

Reply via email to