summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/MM_VMS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExtUtils/MM_VMS.pm')
-rw-r--r--lib/ExtUtils/MM_VMS.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm
index da2a7638ca..dc3b4ceca6 100644
--- a/lib/ExtUtils/MM_VMS.pm
+++ b/lib/ExtUtils/MM_VMS.pm
@@ -96,7 +96,7 @@ sub fixpath {
}
my($fixedpath,$prefix,$name);
- if ($path =~ m#^\$\(.+\)$# || $path =~ m#[/:>\]]#) {
+ if ($path =~ m#^\$\([^\)]+\)$# || $path =~ m#[/:>\]]#) {
if ($force_path or $path =~ /(?:DIR\)|\])$/) {
$fixedpath = vmspath($self->eliminate_macros($path));
}
@@ -105,7 +105,9 @@ sub fixpath {
}
}
elsif ((($prefix,$name) = ($path =~ m#^\$\(([^\)]+)\)(.+)#)) && $self->{$prefix}) {
- my($vmspre) = vmspath($self->eliminate_macros("\$($prefix)")) || ''; # is it a dir or just a name?
+ my($vmspre) = $self->eliminate_macros("\$($prefix)");
+ # is it a dir or just a name?
+ $vmspre = ($vmspre =~ m|/| or $prefix =~ /DIR$/) ? vmspath($vmspre) : '';
$fixedpath = ($vmspre ? $vmspre : $self->{$prefix}) . $name;
$fixedpath = vmspath($fixedpath) if $force_path;
}