summaryrefslogtreecommitdiff
path: root/t/loc_tools.pl
diff options
context:
space:
mode:
Diffstat (limited to 't/loc_tools.pl')
-rw-r--r--t/loc_tools.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/loc_tools.pl b/t/loc_tools.pl
index fbe7242b1e..4f0ae2ba17 100644
--- a/t/loc_tools.pl
+++ b/t/loc_tools.pl
@@ -494,11 +494,13 @@ sub _source_location {
my $caller_filename = (caller)[1];
- return File::Spec->rel2abs(
+ my $loc = File::Spec->rel2abs(
File::Spec->catpath(
- (File::Spec->splitpath($caller_filename))[0, 1]
+ (File::Spec->splitpath($caller_filename))[0, 1], ''
)
);
+
+ return ($loc =~ /^(.*)$/)[0]; # untaint
}
1