[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: PATCH 5.005_63 Document super-obscure feature of chdir()



>And I would hate something like TeXish

>  "The notion of home directory is system-specific.  See your local
>  documentation for details."

Do you believe that users of Perl have so little understanding of
what a home directory is that we should teach them how the precise
determination is made for each and every operating system, and that
these clueless ones will actually get something out of it?

On VMS, we have

    void
    Perl_my_setenv(pTHX_ char *lnm,char *eqv)
    {
      if (lnm && *lnm && strlen(lnm) == 7) {
	char uplnm[8];
	int i;
	for (i = 0; lnm[i]; i++) uplnm[i] = _toupper(lnm[i]);
	if (!strcmp(uplnm,"DEFAULT")) {
	  if (eqv && *eqv) chdir(eqv);
	  return;
	}
      }
      (void) vmssetenv(lnm,eqv,NULL);
    }

Which appears to chdir if you set $ENV{DEFAULT}.

And you also havea

    #define PerlDir_chdir(n)    chdir(((n) && *(n)) ? (n) : "SYS$LOGIN")

Which appears goes to your SYS$LOGIN directory if no argument's given to
chdir.

Jolly, eh?

Are you telling me that perlfunc should talk about this?

I think not.  

--tom


Follow-Ups from:
Ilya Zakharevich <ilya@math.ohio-state.edu>
Russ Allbery <rra@stanford.edu>
References to:
Ilya Zakharevich <ilya@math.ohio-state.edu>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]