summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-06-24 20:50:23 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-06-24 20:50:23 +0000
commit60618c034800c9c7a66cddb35ff64fe34225be2c (patch)
tree4d275364d8504eb8e6f36afa0231dc185352ee15 /vms
parent17f14336e2cc013142be9385a2150e0a87b87ee1 (diff)
downloadperl-60618c034800c9c7a66cddb35ff64fe34225be2c.tar.gz
Document rmsexpand routine and move it to default export list
Diffstat (limited to 'vms')
-rw-r--r--vms/ext/Filespec.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/vms/ext/Filespec.pm b/vms/ext/Filespec.pm
index 3ce67aafda..db3283c571 100644
--- a/vms/ext/Filespec.pm
+++ b/vms/ext/Filespec.pm
@@ -12,6 +12,7 @@ VMS::Filespec - convert between VMS and Unix file specification syntax
=head1 SYNOPSIS
use VMS::Filespec;
+$fullspec = rmsexpand('[.VMS]file.specification');
$vmsspec = vmsify('/my/Unix/file/specification');
$unixspec = unixify('my:[VMS]file.specification');
$path = pathify('my:[VMS.or.Unix.directory]specification.dir');
@@ -61,6 +62,14 @@ subroutine call, which bypasses prototype checking).
The routines provided are:
+=head2 rmsexpand
+
+Uses the RMS $PARSE and $SEARCH services to expand the input
+specification to its fully qualified form. (If the file does
+not exist, the input specification is expanded as much as
+possible.) If an error occurs, returns C<undef> and sets C<$!>
+and C<$^E>.
+
=head2 vmsify
Converts a file specification to VMS syntax.
@@ -124,10 +133,9 @@ require 5.002;
require Exporter;
@ISA = qw( Exporter );
-@EXPORT = qw( &vmsify &unixify &pathify &fileify
- &vmspath &unixpath &candelete);
+@EXPORT = qw( &vmsify &unixify &pathify &fileify
+ &vmspath &unixpath &candelete &rmsexpand );
-@EXPORT_OK = qw( &rmsexpand );
1;
@@ -142,7 +150,7 @@ __END__
# should be adequate for most purposes.
# A sort-of sys$parse() replacement
-sub rmsexpand {
+sub rmsexpand ($;$) {
my($fspec,$defaults) = @_;
if (!$fspec) { return undef }
my($node,$dev,$dir,$name,$type,$ver,$dnode,$ddev,$ddir,$dname,$dtype,$dver);