# Autoload methods go after =cut, and are processed by the autosplit program.
sub glob {
- return doglob(@_);
+ my $pat = shift;
+ my $flags = shift;
+ if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos|MacOS)$/) {
+ $flags |= GLOB_NOCASE();
+ }
+ return doglob($pat,$flags);
}
## borrowed heavily from gsar's File::DosGlob
*pathend = BG_EOS;
errno = 0;
+#ifdef VMS
+ {
+ Char *q = pathend;
+ if (q - pathbuf > 5) {
+ q -= 5;
+ if (q[0] == '.' && tolower(q[1]) == 'd' && tolower(q[2]) == 'i' && tolower(q[3]) == 'r' && q[4] == '/') {
+ q[0] = '/';
+ q[1] = BG_EOS;
+ pathend = q+1;
+ }
+ }
+ }
+#endif
if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
/* TODO: don't call for ENOENT or ENOTDIR? */
if (pglob->gl_errfunc) {
# look up the user's home directory
# should return a list with one item, and not set ERROR
-if ($^O ne 'MSWin32') {
+if ($^O ne 'MSWin32' || $^O ne 'VMS') {
eval {
($name, $home) = (getpwuid($>))[0,7];
1;
# check bad protections
# should return an empty list, and set ERROR
-if ($^O eq 'mpeix' or $^O eq 'MSWin32' or $^O eq 'os2' or not $>) {
+if ($^O eq 'mpeix' or $^O eq 'MSWin32' or $^O eq 'os2' or $^O eq 'VMS' or not $>) {
print "ok 6 # skipped\n";
}
else {
GLOB_BRACE | GLOB_NOMAGIC
);
unless (@a == 3
- and $a[0] eq 'TEST'
+ and $a[0] eq ($^O eq 'VMS'? 'test.' : 'TEST')
and $a[1] eq 'a'
and $a[2] eq 'b')
{