From: "Marcus Holland-Moritz" <mhx-perl@gmx.net>
Message-ID: <
00dc01c3581d$c3412c30$0c2f1fac@R2D2>
p4raw-id: //depot/perl@20445
# File::Glob::glob() is deprecated because its prototype is different from
# CORE::glob() (use bsd_glob() instead)
sub glob {
+ splice @_, 1; # don't pass PL_glob_index as flags!
goto &bsd_glob;
}
#ifndef MACOS_TRADITIONAL
patnext = (U8 *) pattern;
#endif
+ /* TODO: GLOB_APPEND / GLOB_DOOFFS aren't supported yet */
+#if 0
if (!(flags & GLOB_APPEND)) {
pglob->gl_pathc = 0;
pglob->gl_pathv = NULL;
if (!(flags & GLOB_DOOFFS))
pglob->gl_offs = 0;
}
+#else
+ pglob->gl_pathc = 0;
+ pglob->gl_pathv = NULL;
+ pglob->gl_offs = 0;
+#endif
pglob->gl_flags = flags & ~GLOB_MAGCHAR;
pglob->gl_errfunc = errfunc;
pglob->gl_matchc = 0;
print "1..0\n";
exit 0;
}
- print "1..11\n";
+ print "1..12\n";
}
END {
print "not ok 1\n" unless $loaded;
unlink @f_names;
chdir "..";
rmdir "pteerslo";
+
+# this can panic if PL_glob_index gets passed as flags to bsd_glob
+<*>; <*>;
+print "ok 12\n";