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

Re: [MacPerl] tool interface with MPW?



"Douglas P. McNutt" <dmcnutt@macnauchtan.com> writes:
>These are some things I believe to be true for the MPW tool, but I'd like a
>formal concurrence from someone - Matthias?
>
>If an error occurs during compilation, The Perl tool will return non zero
>{Status} to MPW.

Yes.

>On completion of a Perl script the most recently evaluated item will be return
ed
>in {Status} just as it is in a Perl subroutine.

No. *if* you execute the "exit()" command, the value you pass for exit will
be returned. If you don't have an exit command, exit(0) is assumed.

>The special hash %ENV stores environment variables from MPW. This hash is fill
ed
>from all existing environment variables in MPW at the time of execution of the
>Perl script so that, for instance, $ENV(Worksheet) is the full pathname of the
>MPW worksheet.

Yes, and some majick is done on Hash lookups so $ENV{WORKSHEET} gives the
same value as $ENV{WORkSHeet}. (Not that you need braces, not parentheses!)

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