Change 13807 by jhi@alpha on 2001/12/19 15:59:02

        One more embedded (?sx) de-embedded, from Wolfgang Laun.

Affected files ...

.... //depot/perl/ext/B/B/Assembler.pm#12 edit

Differences ...

==== //depot/perl/ext/B/B/Assembler.pm#12 (text) ====
Index: perl/ext/B/B/Assembler.pm
--- perl/ext/B/B/Assembler.pm.~1~       Wed Dec 19 09:15:05 2001
+++ perl/ext/B/B/Assembler.pm   Wed Dec 19 09:15:05 2001
@@ -160,9 +160,8 @@
 sub strip_comments {
     my $stmt = shift;
     # Comments only allowed in instructions which don't take string arguments
+    # Treat string as a single line so .* eats \n characters.
     $stmt =~ s{
-       (?sx)   # Snazzy extended regexp coming up. Also, treat
-               # string as a single line so .* eats \n characters.
        ^\s*    # Ignore leading whitespace
        (
          [^"]* # A double quote '"' indicates a string argument. If we
@@ -170,7 +169,7 @@
        )
        \s*\#   # Any amount of whitespace plus the comment marker...
        .*$     # ...which carries on to end-of-string.
-    }{$1};     # Keep only the instruction and optional argument.
+    }{$1}sx;   # Keep only the instruction and optional argument.
     return $stmt;
 }
 
End of Patch.

Reply via email to