Subject: | Useless use of /d modifier in transliteration operator from XML::XPath::Function::translate |
Warning noticed when running the tests with perl522
Show quoted text
> prove -Ilib -vw t/48translate.t
t/48translate.t ..
ok 1
ok 2
ok 3
Useless use of /d modifier in transliteration operator at (eval 10) line 1.
ok 4
1..4
ok
All tests successful.
Files=1, Tests=4, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.07 cusr 0.00 csys = 0.11 CPU)
Result: PASS
This is coming from here in the eval
sub translate {
my $self = shift;
my ($node, @params) = @_;
die "translate: Wrong number of params\n" if @params != 3;
local $_ = $params[0]->string_value;
my $find = $params[1]->string_value;
my $repl = $params[2]->string_value;
eval "tr/\Q$find\E/\Q$repl\E/d";
die $@ if $@;
return XML::XPath::Literal->new($_);
}