I’m referring here to CVs, not C functions.
Actually, bsd_glob is the alias to doglob. doglob is no longer
called, as of commit
1bb8785ab1. So this commit is actually renaming
doglob to bsd_glob and removing the alias.
my %modules = (
# ModuleName => q|code to check that it was loaded|,
'Cwd' => q| ::can_ok( 'Cwd' => 'fastcwd' ) |, # 5.7 ?
- 'File::Glob' => q| ::can_ok( 'File::Glob' => 'doglob' ) |, # 5.6
+ 'File::Glob' => q| ::can_ok( 'File::Glob' => # 5.6
+ $] > 5.014
+ ? 'bsd_glob' : 'doglob') |,
$db_file => q| ::can_ok( $db_file => 'TIEHASH' ) |, # 5.0
'Socket' => q| ::can_ok( 'Socket' => 'inet_aton' ) |, # 5.0
'Time::HiRes'=> q| ::can_ok( 'Time::HiRes' => 'usleep' ) |, # 5.7.3
RETVAL
void
-doglob(pattern,...)
+bsd_glob(pattern,...)
char *pattern
-PROTOTYPE: $;$
PREINIT:
glob_t pglob;
int i;
PPCODE:
{
dMY_CXT;
- dXSI32;
/* allow for optional flags argument */
if (items > 1) {
flags = (int) SvIV(ST(1));
/* remove unsupported flags */
flags &= ~(GLOB_APPEND | GLOB_DOOFFS | GLOB_ALTDIRFUNC | GLOB_MAGCHAR);
- } else if (ix) {
+ } else {
flags = (int) SvIV(get_sv("File::Glob::DEFAULT_FLAGS", GV_ADD));
}
BOOT:
{
- CV *cv = newXS("File::Glob::bsd_glob", XS_File__Glob_doglob, __FILE__);
- XSANY.any_i32 = 1;
#ifndef PERL_EXTERNAL_GLOB
/* Don’t do this at home! The globhook interface is highly volatile. */
PL_globhook = csh_glob;