File::Spec::VMS(3perl)
π File::Spec::VMS β the vibe β¨
okay so bestie, welcome to File::Spec::VMS</p>, a little module from the Perl Programmers Reference Guide that's all about VMS file specs. yeah. VMS. the operating system your dad's coworker won't stop talking about. it goes hard actually π«Ά
β¨ SYNOPSIS β¨
require File::Spec::VMS; # Done internally by File::Spec if needed
like, you can type that, but honestly File::Spec already handles it for you if it needs to. it's giving "self-sufficient queen" π
πΈ DESCRIPTION πΈ
so for the actual rundown of what these methods do, go read File::Spec::Unix β that's where the docs live. what this package does is swap out the implementation of those methods, not the semantics. same vibe, different plumbing. no cap β¨
the default behavior here is extremely chill: it'll take either VMS syntax or Unix syntax as input, and it hands you back VMS syntax on output β unless you've explicitly asked for Unix syntax via the DECC$FILENAME_UNIX_REPORT CRTL feature. then it's Unix girl summer. π¦
π the methods (all overrides, all iconic) π
canonpath(override) β strips out the redundant bits of a file specification and gives you back the result in native syntax... unless Unix filename reporting is turned on, in which case, different story bestie.catdir(override) β smooshes a list of file specifications together and returns the result as a native directory specification, unless the Unix filename reporting feature is enabled. heads up: it does not check for "impossible" cases (like when something other than the first element is an absolute filespec). it just trusts you. main character energy, honestly. π«Άcatfile(override) β takes a list of directory specifications plus a filename specification and builds you a whole path out of them. assembly required, results slay.curdir(override) β hands back a string representation of the current directory:'[]'or'.'devnull(override) β string representation of the null device:'_NLA0:'or'/dev/null'β the void, but make it a string πrootdir(override) β string representation of the root directory:'SYS$DISK:[000000]'or'/'β the very top, the final boss, the origin story πtmpdir(override) β gives you a string representation of the first writable directory from this list, or''(empty string!) if none of them are writable:/tmpifDECC$FILENAME_UNIX_REPORTis enabled.sys$scratch:$ENV{TMPDIR}
β οΈ okay important: if you're running under taint mode, and $ENV{TMPDIR} is tainted, it is not used. safety first, bestie π§
updir(override) β string representation of the parent directory:'[-]'or'..'β going back up, we love a glow-up journey β¨case_tolerant(override) β VMS file specification syntax is case-tolerant. she does not care about your capitalization. unbothered. πpath(override) β translates the logical nameDCL$PATHas a searchlist, instead of trying to "split" the string value of$ENV{'PATH'}. totally different approach, and it ate.file_name_is_absolute(override) β checks for a VMS directory spec as well as Unix separators. both. she contains multitudes. πΈsplitpath(override) β here's the shape of it:
($volume,$directories,$file) = File::Spec->splitpath( $path );
($volume,$directories,$file) = File::Spec->splitpath( $path,
$no_file );
passing a true value for $no_file tells it that the path you're splitting only contains directory components β even on systems where you can usually tell directories and files apart at a glance (when you're not supporting a foreign syntax, anyway). so like, yes, sometimes she needs a hint. π
splitdir(override) β splits a directory specification into its components. chop chop πcatpath(override) β constructs a complete filespec. from scratch. no template. obsessed.abs2rel(override) β attempts to convert an absolute file specification into a relative one. yes, attempts. we're trying our best here πrel2abs(override) β returns an absolute file specification built from a relative one.
π COPYRIGHT π
Copyright (c) 2004-14 by the Perl 5 Porters. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π₯ SEE ALSO π₯
go check out File::Spec and File::Spec::Unix. and just to say it one more time because it matters: this package overrides the implementation of these methods, not the semantics. same rules, new engine, periodt. π
and if you want the full lore on VMS file specs, it lives here:
http://h71000.www7.hp.com/doc/731FINAL/4506/4506pro_014.html#apps_locating_naming_files
π and that's a wrap on File::Spec::VMS(3perl), bestie!! this was generated as part of perl v5.44.0, dated 2026-10-17 β so if you're reading this from the future, hi, you're doing amazing, drink some water πβ¨π
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms