At 17:50 +0300 2002.05.31, Jarkko Hietaniemi wrote:
>> -    # Yes, %INC uses Unixy filepaths.
>> -    is( $INC{'Yup.pm'}, join("/",$Lib_Dir, 'Yup.pm'),    '%INC set
>> properly' );
>> +    is( $INC{'Yup.pm'}, File::Spec->catfile( $Lib_Dir, 'Yup.pm'),
>> '%INC set properly' );
>
>I don't we can break this documented feature (like, ever).  Instead,
>could the (internal) %INC and @INC handling in MacOS Classic be hacked
>to always talk UNIX?

I don't know.  Many people do things like open FOO, $INC{'Yup.pm'}, and
changing to the documtented behavior -- where is that documented? -- will
completely break any usage of %INC by Perl programs.  They will all need to
run paths through nativize first, and what about the cases where the path
is absolute?  How would "Macintosh HD:Applications (Mac OS 9):MacPerl
Ÿ:lib:Carp.pm" be turned into a usable Unix-y path, that could then be used
again on Mac OS?

>From perlvar:

>The hash %INC contains entries for each filename included via the do,
>require, or use operators.  The key is the filename you specified (with
>module names converted to pathnames), and the value is the location of
>the file found.  The require operator uses this hash to determine
>whether a particular file has already been included.

It seems to me the path should be the actual location, which means, for Mac
OS, Mac-specific.

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

Reply via email to