This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
S_pmtrans(): add assert and simplify conditional
authorDavid Mitchell <davem@iabyn.com>
Mon, 8 Jan 2018 16:14:17 +0000 (16:14 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 19 Jan 2018 11:24:55 +0000 (11:24 +0000)
commitddcffd84df3b0cf7b2325bed1db38b89bf19fa53
treeaf7c464b1c95644af7cddf035cce863cd7b3ae9b
parent3325280992ff265f86b809c2dc177658f00b4414
S_pmtrans(): add assert and simplify conditional

in tr/search/replace/c, the number of 'paired' replacement chars
will always be <= length(replace). Assert this, and thus simplify a couple
of conditionals from >= to ==.

It should make no difference to execution, but reduces the cognitive
load.
op.c