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

Re: [MacPerl] Problems with the Files.pm module



pr1@club-internet.fr, mac-perl@iis.ee.ethz.ch

Philippe de Rochambeau writes recently:

!I am having problems using the Files.pm module.
!
!When I put "use Files;" in my code, MacPerl tells me it cannot find the module.
!
!"push(@INC, Mac);" does not make any difference.
!
!What should I do?

I beleive Matthius has already answered this one.

!Furthermore, how should I use the FindFolder function?
!
!With or without a return parameter?
!
!With of without parentheses?
!
!$return = Files::FindFolder($file, kOnSystemDisk); ?

In any programming language it is best to "check the return value", 
but some languages, including perl, often allow you to get away with 
a quick and dirty hack by not checking.  It should probably 
ultimately depend on your intended use: Will your script be used by 
many folks on lots of different machines? Then not only use the 
return value but check it for warnings, errors, etc. (along with $@, $! 
and friends).  If your script is intended only for personal use and you 
feel confident in your ability to remember why your script messes up 
when it can't FindFolder() a few months from now then it isn't 
necessary to do the check.

!Many thanks.
!
!Philippe de Rochambeau
!
!P.S. for those of you who would like to refer me to the FAQ please don't
!because it is currently unavailable (I got Error number 404 when clicking
!on its link).

The URL that is commonly listed (including the MacPerlFAQ.html on CPAN) is:

  http://www.sasknet.com/~dalgl/MacPerlFAQ.html   # < wrong

Nut if you go to http://www.sasknet.com/ there is a search script that 
points out that the real home is:

  http://www.sasknet.com/users/dalgl/html/MacPerlFAQ.html

Any of the CPAN sites that runs a webserver can give you the MacPerlFAQ 
via http (if you don't like ftp which is the protocol in use at *all* 
CPAN sites).  So for example you could try:

   http://www.perl.org/CPAN/ports/mac/MacPerlFAQ.html
   http://www.cdrom.com/pub/perl/CPAN/ports/mac/MacPerlFAQ.html
   
(the document is also linked into the doc/FAQs/ directories on CPAN).

BTW I like to take this opportunity to thank Matthius and Paul Schinder 
for their recent help.  This problem of locating the MacPerlFAQ led me 
to attempt to send email to you two as well as bob.dalgleish@sk.sympatico.ca 
and bw@fu-manchu.pindar.co.uk. I have reason to believe that the unix 
mailer that I am required to use from behind a firewall did not get that 
message out.  It was a reqest to change the wording of the answer to 
Q 1.3) to specifically mention that (MPW|Mac)perl 5 runs on 68020, 68030 
and 68040 Macs.  I hope this message to the list makes it to them.


Peter Prymmer


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