my $whereami = $FindBin::Bin;
#my $infile = 'config/ytmd.cfg'; # no problem
#my $infile = File::Spec->catdir('config', 'abc.cfg'); # no problem
my $infile = File::Spec->catdir($whereami, 'config', 'ytmd.cfg'); # pr
open my $fh, '<:encoding(UTF-8)', $infile or die;
Doing a perl -T xx.pl or prove -T xx.pl (for the above script), it fails with this message Unknown PerlIO layer "encoding" at xx.pl line 14. which can be fixed with a use PerlIO::encoding; and it does not complain about what looks to me like tainted input.
However, if I remove use Test::More then the error becomes Insecure dependency in require while running with -T switch at xx.pl line 14. which is what i would expect. I am missing out something, for sure.
Perl v5.32 Test::More v1.302188 (latest)