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

Re: [MacPerl] Trouble with MacPerl::GetFileInfo



jcj@mail.usyd.edu.au (Jason Johnston) writes:
>Hi MacPerl Guri,

Hmm, an interesting declination. Right now, I can't recall any Latin word ending
with -u, so I'll have to trust you on this.

>When using MacPerl::GetFileInfo to get the (creator and) type of a file, I
>get results which are (a) inconsistent, and (b) wrong.

>Here's a list of files with their types, reported (correctly) by MPW:
>
>        files -x t
>        Name                  Type
>        --------------------  ----
>        AppAliases            Fldr
>        Go                    TEXT
>        out                   TEXT
>        rgrep                 TEXT
>        testinfo              TEXT
>        textgrep              TEXT
>        tgrep                 TEXT

There are two problems here:

 - MacPerl::GetFileInfo indeed contains a bug in the current release of MacPerl
   causing calls to randomly flake out. A workaround is to include a statement 
   "$! = 0;" before each call to MacPerl::GetFileInfo.
 - Your expectation that MacPerl::GetFileInfo returns "Fldr" when called on a 
   folder would be consistent with MPW, but this "Fldr" business is purely an
   MPW artifact with no counterpart in file system reality.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "These days, though, you have to be pretty technical before you can 
    even aspire to crudeness." -- William Gibson, _Johnny Mnemonic_

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch