Thread (1 message) 1 message, 1 author, 2024-10-11

Re: [PATCH 00/13] Update versions of libcurl and Perl

From: Junio C Hamano <hidden>
Date: 2024-10-11 16:48:27

"brian m. carlson" [off-list ref] writes:
The final commit introduces a small but useful change that we can now
take advantage of with our newly updated Perl dependency as an example
of why this is a generally beneficial change.  It can be omitted without
problem if it is judged to be too noisy.
Quite honestly, these two changes, each of which is a one-liner, are
so boringly trivial for being "too noisy".  But on the other hand, I
am not sure it demonstrates why it is a "generally beneficial
change" sufficiently well, either.  The pre-s///r idiom

    (my $result = $orig_to_be_kept) =~ s/...//;

was concice enough that

    my $result = ($orig_to_be_kept =~ s/...//r);

does not make all that much improvement.  Where it shines, I would
imagine, is to rewrite an original that did not use the idiom using
the 'r' modifier, but fortunately we didn't have such a code?

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help