A copy of what I sent to perlbug:

The perlrun document states that the PERL5LIB environment variable is a colon-separated list of directories. On my platform, this is incorrect. The perl source shows a PERLLIB_SEP symbol in perl.c that is a ';' for DOSISH and EPOC, ',' for MACOS_TRADITONAL, etc.

The proper separator is also found in $Config::Config{path_sep}.

The documentation should state that the list is delimited with the appropreate symbol for the platform, which can be determined using the Config module.

The PERLLIB description also has this error.

  • Comment on colons don't always separate path items!

Replies are listed 'Best First'.
Re: colons don't always separate path items!
by PodMaster (Abbot) on Jul 01, 2003 at 19:25 UTC
    You should submit a patch/bugreport for perlrun.pod and wherever else that's wrong. I'd like to add `perldoc Env'
    use Env qw[ PATH @PATH ]; @PATH = qw/ as df ef gh /; die $PATH; __END__ as;df;ef;gh at - line 3.
    Cool.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      Assuming I edit the pod files, how do I generate a patch and who do I send it to?

      —John

When in Rome: Re: colons don't always separate path items!
by diotalevi (Canon) on Jul 01, 2003 at 19:10 UTC

    Good catch on the documentation. I always thought it was somewhat obvious that path names and environment variables deferred to the local conventions.

      Actualy, that's a rather strange assumption, considering that for, say use lib you should use the unix convention, no matter where you are.

      Hidden assumptions are dangerous things.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

        I'd characterize lib's use of unix conventions as unusual. Having environment variables with values suitable for a different operating system would be odd. It might be because of the source file, operating environment distinction though. lib's value is used at compile time and is directly in the source so it may be less copacetic to require a OS-neutral representation. The environment variable though is completely divorced from the perl script. In fact, it is applicable to all perl scripts so in that context I still hold that it would strange to require unix conventions in a very non-unix place.

        I'm confused. use lib takes a list as argument, each element of the list being a directory to search. To which UNIX convention are you referring - I don't know any commonly used environment variable that takes a list (after all, the variables are scalars).

        Abigail

        That's not really a lib specific thing now is it? You can for instance, still feed UNIX style paths to open etc. Granted it's not the only way, but it is probably the sanest.

        --
        I'm not belgian but I play one on TV.