Re: [MacPerl-Porters] [PROPOSED PATCHES] lib.pm/lib.t

[email protected] (Chris Nandor) Fri, 31 May 2002 14:20:18 -0400
Newsgroups perl.macperl.porters
Message-ID <p0510030fb91d6e3291b5@[10.0.1.177]>
At 21:11 +0300 2002.05.31, Jarkko Hietaniemi wrote:
>> It seems to me the path should be the actual location, which means, for Mac
>> OS, Mac-specific.
>
>How about non-Mac code that stuffs UNIXy paths to *INC?

Can you give me an example of what you mean?

If you do this:

	BEGIN { @INC = "./lib" }
	use Data::Dumper;
	require ":Data:Dumper.pm";
	print Dumper \%INC;

You get this:

	$VAR1 = {
	          'Exporter.pm' => ':lib:Exporter.pm',
	          'Carp.pm' => ':lib:Carp.pm',
	          'XSLoader.pm' => ':lib:XSLoader.pm',
	          'overload.pm' => ':lib:overload.pm',
	          ':Data:Dumper.pm' => ':lib:Data:Dumper.pm',
	          'warnings/register.pm' => ':lib:warnings:register.pm',
	          'warnings.pm' => ':lib:warnings.pm',
	          'Data/Dumper.pm' => ':lib:Data:Dumper.pm'
	        };

Which is what I would expect.  The KEYS in %INC are UNIXy, but the values
are not (unless as shown, someone does a require/do with a filename, then
the pathname is added to %INC unchanged).

-- 
Chris Nandor                      [email protected]    http://pudge.net/
Open Source Development Network    [email protected]     http://osdn.com/