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

Re: [MacPerl] perl tool under MPW - @INC behaviour



Dave Beverly wrote:
>I seem to remember seeing a post about this before, but I can't locate it now.
..
>
>when invoking a script from MPW, if the script contains any use declarations (
 eg. use Mac::Files ) or tries to directly access any lib routines ( eg. File::
Copy ( $foo, $bar ) ), perl reports that it cannot find the file in @INC, as be
low...

Just put a line

Set PERL5LIB="Teena:MacPerl Tool Ÿ:lib:"; Export PERL5LIB

into one of your MPW startup files (I use UserStartup*Perl, where the * is a
bullet character).

>I tried adding the following lines at the top of the script...
>
>>#!perl
>>$lib = "Teena:MacPerl Tool Ÿ:lib:";
>>unshift @INC, $lib;

Won't work because "use" is executed in a BEGIN context. See Bob Wilkinson's
mail for more details about this.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "I'm set free to find a new illusion" -- Velvet Underground

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