p4raw-id: //depot/perl@15569
# ignore patch backups, RCS files, emacs backup & temp files and the
# .exists files, .PL files, and .t files.
- return if $name =~ m{\.orig$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.t$};
+ return if $name =~ m{\.orig$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.t$} ||
+ $dir =~ m{/t(?:/|$)};
$name = "$dir/$name" if $dir ne '';