Re: MSVC build broken with perl 5.10 - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: MSVC build broken with perl 5.10
Date
Msg-id 20080410145327.GB5536@svana.org
Whole thread Raw
In response to Re: MSVC build broken with perl 5.10  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Thu, Apr 10, 2008 at 04:12:56PM +0200, Magnus Hagander wrote:
> > >     my $replace_re =
> > > qr{^([^:\n\$]+\.c)\s*:\s*(?:%\s*: )?\$(\([^\)]+\))\/(.*)\/[^\/]+$};

> > Perhaps you would like to comment it using the x format, so that it
> > doesn't just look like white noise.
>
> That would be a good idea, no? ;-) I have no idea what you mean with
> "using the x format", though, but I agree in general that the
> white-noise format is not a good idea...

Using x format modifier means you can put comments and whitespace in your regex, like:

my $replace_re = qr{^([^:\n\$]+\.c)    # This matches the filename in $1                   \s*:\s*(?:%\s*:\ )? #
somethigwith a %-sign                  ...etc...                  }x; 
Check the perlre manpage for more info.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: [DOCS] [SQL] pl/PgSQL, variable names in NEW
Next
From: Tom Lane
Date:
Subject: Re: Commit fest queue