C4::ClassSplitRoutine::RegEx - regex call number sorting key routine
use C4::ClassSplitRoutine;
my $cn_sort = C4::ClassSplitRoutine::RegEx::split_callnumber($cn_item, $regexs);
my $cn_split = C4::ClassSplitRoutine::RegEx::split_callnumber($cn_item, $regexs);
_apply_substitution( \$string, $regex );
Applies a single admin-configured s/// substitution to $string in place, without ever evaluating the input as code. The rule is parsed as s/PATTERN/REPLACEMENT/FLAGS (any non-space delimiter is accepted); the pattern is compiled with qr// (so embedded-code assertions are treated as a runtime pattern and blocked by Perl), and the replacement is expanded as data via Koha::Regex::Replacement::expand_template. The /e flag is rejected and anything that is not a plain substitution is ignored. This replaces the previous eval "\$cn_item =~ $regex" stringy eval, which executed arbitrary Perl.
Koha Development Team <https://koha-community.org/>