in reply to Re: When in Rome: Re: colons don't always separate path items!
in thread colons don't always separate path items!

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

Replies are listed 'Best First'.
Re: Re: When in Rome: Re: colons don't always separate path items!
by theorbtwo (Prior) on Jul 02, 2003 at 01:20 UTC

    I was refering to pathname conventions -- specificly, the path seperator should always be '/', not that of the platform where the code is running. To quote the POD (5.8.0), "In order to keep lib.pm small and simple, it only works with Unix filepaths. This doesn't mean it only works on Unix, but non-Unix users must first translate their file paths to Unix conventions." (Interestingly, this seems to increase, not decrese, the size of lib.pm -- of couse, it makes the code /using/ lib much simpiler.)


    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).

      The POD is wrong at worst and misleading at best:

      use lib 'd:\\foo\\bar'; use Baz; __END__ in Baz! at d:\foo\bar/Baz.pm line 3. Compilation failed in require at c:\temp\tlib.pl line 2. BEGIN failed--compilation aborted at c:\temp\tlib.pl line 2.
      #D:\foo\bar\baz.pm package Baz; die "in Baz!";

      And its pretty damn stupid. How on earth to you convert a D:\foo or a \\machine\share to a "unix convention"? And is it reasonable to expect every Perl programmer to be familiar with Unix conventions?

      Unix bigotry in perl really annoys me. The p5p mob should know better.


      ---
      demerphq

      <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...