[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Directory separator magic?



In article <38577117.12469842@relay.skynet.be>, bart.lateur@skynet.be (Bart Lateur) writes:
> [Sent again since my first try on 7 dec. didn't get through]
> When glancing over the source code for XML::Parser and
> XML::Parser::Expat, I stumbled across the following snippets of code:

> 	require "URI/URL;pm";

> 	$have_File_Spec = do 'File/Spec.pm';

> Excuse me? On a Mac? Oddly enough, it even seems to be working! Is there
> some kind of '/' to ':' mapping going on behind the scenes that I'm
> unaware of?

Yes, but only for this particular case, because the included modules are

 a) always accessed read-only.
 b) guaranteed not to have real '/'es in their names. 

So, because there is plenty of code like the above, this case is magicked out.

> But what's the exact status on this undocomented (AFAIK) directory
> separator magic?

It's here to stay :-)

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "And that's why I am going to turn this world upside down, and make
   of it a fire so *bright* that someone real will notice"
                                -- Vernor Vinge, _Tatja Grimm's World_

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org