# Perl hooks into the routines in vms.c for interconversion
# of VMS and Unix file specification syntax.
#
-# Version: 1.1
+# Version: see $VERSION below
# Author: Charles Bailey bailey@newman.upenn.edu
# Revised: 08-Mar-1995
package VMS::Filespec;
require 5.002;
+our $VERSION = '1.11';
# If you want to use this package on a non-VMS system,
# uncomment the following line.
($node,$dev,$dir,$name,$type,$ver) = $fspec =~
/([^:]*::)?([^:]*:)?([^>\]]*[>\]])?([^.;]*)(\.?[^.;]*)([.;]?\d*)/;
foreach ((@$defaults,$ENV{'DEFAULT'})) {
+ next unless defined;
last if $node && $ver && $type && $dev && $dir && $name;
($dnode,$ddev,$ddir,$dname,$dtype,$dver) =
/([^:]*::)?([^:]*:)?([^>\]]*[>\]])?([^.;]*)(\.?[^.;]*)([.;]?\d*)/;
return '' unless -w $fspec;
$fspec =~ s#/$##;
if ($fspec =~ m#/#) {
- ($parent = $fspec) =~ s#/[^/]+$#;
+ ($parent = $fspec) =~ s#/[^/]+$##;
return (-w $parent);
}
elsif ($parent = fileify($fspec)) { # fileify() here to expand lnms