runtests: eliminate a warning on old perl versions

The warning "Use of implicit split to @_ is deprecated" showed between
perl versions about 5.8 through 5.11.
This commit is contained in:
Dan Fandrich 2023-09-14 16:23:08 -07:00
parent 06cdfad49f
commit 989e1f35e8

View File

@ -753,7 +753,8 @@ sub singletest_prepare {
my $path = $filename;
# cut off the file name part
$path =~ s/^(.*)\/[^\/]*/$1/;
my $nparts = scalar(split(/\//, $LOGDIR));
my @ldparts = split(/\//, $LOGDIR);
my $nparts = @ldparts;
my @parts = split(/\//, $path);
if(join("/", @parts[0..$nparts-1]) eq $LOGDIR) {
# the file is in $LOGDIR/