This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make vmsify support files with no directory component.
We've been assuming there is always a directory portion to a path
being converted to VMS format, and it's true that translating
directory delimiters and such is the most noticeable aspect of
such conversions. But we also depend on the conversion to add
caret escapes to characters in the path that are only valid when
using Extended Filename Syntax (EFS), but weren't doing that
for paths with no directory component.
I.e., this was working:
/disk/dir/foo%bar --> disk:[dir]foo^%bar
but this was not (until now):
foo%bar --> foo^%bar
Since we're now working on a pointer that has not necessarily
been incremented while adding directory syntax, we also add
a number of guards to make sure we don't peek beyond the
beginning of the result string.
N.B. There will be a separate commit following shortly that
prevents paths with no directory component from being passed
through as-is -- here we just provide the infrastructure to
make that possible.