login
Header Space

 
 

Re: WIP: asciidoc replacement

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Sam Vilain <sam@...>, <git@...>, <msysgit@...>
Date: Wednesday, October 3, 2007 - 12:51 am

On Wed, Oct 03, 2007 at 05:23:35AM +0100, Johannes Schindelin wrote:


Try "perldoc strict" for details.


I think he means reformatting to

  if (condition) {
  }
  elsif (condition) {
  }


It's quite common if you have a dispatch function, but obviously not
required.


print <<EOF;
foo
EOF

HERE-docs necessarily break indentation unless you strip it out manually
(which is inefficient and ugly).

But two things that might make that look better are using qq// (to avoid
having to escape quotes) and interpolating the variables:

  . qq/." Generator: $self->{generator}\n/


It's in perlop, but it's basically a fancy way of double-quoting, except
that you get to choose the delimiter.


I think you might be confused about how the 's' modifier works. You are
not using it, so '.' is the same as '[^\n]'. Perl will always match a
newline if it's in your regex. If you specify 'm', then it will also
allow '^' and '$' to match at line boundaries (instead of just at the
beginning and end of the string).

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
WIP: asciidoc replacement, Johannes Schindelin, (Tue Oct 2, 8:42 pm)
Re: WIP: asciidoc replacement, Junio C Hamano, (Wed Oct 3, 12:48 am)
Re: [msysGit] Re: WIP: asciidoc replacement, Johannes Schindelin, (Wed Oct 3, 7:50 am)
Re: [msysGit] Re: WIP: asciidoc replacement, David Kastrup, (Wed Oct 3, 8:02 am)
Re: WIP: asciidoc replacement, Wincent Colaiuta, (Wed Oct 3, 2:34 am)
Re: WIP: asciidoc replacement, David Kastrup, (Wed Oct 3, 4:12 am)
Re: WIP: asciidoc replacement, Wincent Colaiuta, (Wed Oct 3, 6:05 am)
Re: WIP: asciidoc replacement, Junio C Hamano, (Wed Oct 3, 6:57 am)
Re: WIP: asciidoc replacement, Martin Langhoff, (Thu Oct 4, 2:55 am)
Re: WIP: asciidoc replacement, David Kastrup, (Thu Oct 4, 4:58 pm)
Re: WIP: asciidoc replacement, Martin Langhoff, (Thu Oct 4, 6:49 pm)
Re: WIP: asciidoc replacement, Sam Ravnborg, (Wed Oct 3, 1:46 pm)
Re: WIP: asciidoc replacement, Johannes Schindelin, (Wed Oct 3, 2:57 pm)
Re: WIP: asciidoc replacement, Sam Ravnborg, (Wed Oct 3, 3:21 pm)
Re: WIP: asciidoc replacement, David Kastrup, (Wed Oct 3, 6:25 am)
Re: WIP: asciidoc replacement, J. Bruce Fields, (Wed Oct 3, 9:47 am)
Re: WIP: asciidoc replacement, David Kastrup, (Wed Oct 3, 10:01 am)
Re: WIP: asciidoc replacement, Sam Ravnborg, (Wed Oct 3, 6:52 am)
Re: WIP: asciidoc replacement, Sam Vilain, (Tue Oct 2, 9:56 pm)
Re: WIP: asciidoc replacement, Wincent Colaiuta, (Wed Oct 3, 2:40 am)
Re: WIP: asciidoc replacement, Johannes Schindelin, (Wed Oct 3, 12:23 am)
Re: WIP: asciidoc replacement, Sam Vilain, (Thu Oct 4, 12:13 am)
Re: WIP: asciidoc replacement, Johannes Schindelin, (Thu Oct 4, 8:41 am)
Re: WIP: asciidoc replacement, J. Bruce Fields, (Wed Oct 3, 9:55 am)
Re: WIP: asciidoc replacement, Jeff King, (Wed Oct 3, 12:51 am)
speck-geostationary