This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70a5eb4
)
Fix escaping in opcode.h generation
author
Dagfinn Ilmari Mannsåker (via RT)
<perlbug-followup@perl.org>
Mon, 23 Aug 2010 23:05:48 +0000
(16:05 -0700)
committer
David Mitchell
<davem@iabyn.com>
Wed, 25 Aug 2010 17:34:51 +0000
(18:34 +0100)
The op list has no escapes, so there's no need check for already-escaped
characters, and the existing regex breaks any run of consecutive
backslashes, escaped or not.
opcode.pl
patch
|
blob
|
blame
|
history
diff --git
a/opcode.pl
b/opcode.pl
index
1dadb53
..
1b8c688
100755
(executable)
--- a/
opcode.pl
+++ b/
opcode.pl
@@
-209,7
+209,7
@@
for (@ops) {
my($safe_desc) = $desc{$_};
# Have to escape double quotes and escape characters.
- $safe_desc =~ s/(
^|[^\\])([\\"])/$1\\$2
/g;
+ $safe_desc =~ s/(
[\\"])/\\$1
/g;
print qq(\t"$safe_desc",\n);
}