projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6b99bf
)
perldelta: Turn one-liner into a block of code
author
Father Chrysostomos
<sprout@cpan.org>
Tue, 13 Dec 2011 22:40:20 +0000
(14:40 -0800)
committer
Father Chrysostomos
<sprout@cpan.org>
Tue, 13 Dec 2011 22:41:07 +0000
(14:41 -0800)
so the line isn’t too long.
pod/perldelta.pod
patch
|
blob
|
history
diff --git
a/pod/perldelta.pod
b/pod/perldelta.pod
index
63a2da6
..
2143cd9
100644
(file)
--- a/
pod/perldelta.pod
+++ b/
pod/perldelta.pod
@@
-610,7
+610,12
@@
named captures that weren't matched as part of a regex ever since 5.10
when they were introduced, e.g. this would consume over a hundred MB
of memory:
- perl -wle 'for (1..10_000_000) { if ("foo" =~ /(foo|(?<capture>bar))?/) { my $capture = $+{capture} } } system "ps -o rss $$"'
+ for (1..10_000_000) {
+ if ("foo" =~ /(foo|(?<capture>bar))?/) {
+ my $capture = $+{capture}
+ }
+ }
+ system "ps -o rss $$"'
=item *