>#! -tw
> use CGI ':standard';
These are in my MPW startup file. The stuff in MPP&E and the distribution are a more
obscure way to get it done. It also adds menu items to MPW that you may never use.
Note that I use a command alias while the distribution will add the perl folder to
the search path in {commands}. It's a matter of choice but there are no other tools or
MPW commands in the folder.
# The path to the MacPerl libraries and documentation'
Set -e MACPERL "Luna:Applications:MacPerl:"
# The path to the MacPerl libraries'
Set -e PERL5LIB "{MACPERL}lib:"
alias perl "{MACPERL}perl"
alias shuck "{MACPERL}Shuck"
It's also probably better under MPW to use a more UNIX-like calling sequence:
perl -tw "{theScript}" "{arg0}" "{arg1}" . . .
The #! -xxx convention is a workaround for the lack of a command line in the pre OS
exx environment. It probably works in the MPW tool but I have never tried it. I'm also
not sure about the convention when you move a perl script onto a UNIX server to be
used as a cgi process.
I use the MPW setfile command to change the creator code for the modules to that of
shuck so that double clicking in the finder brings up the plain old documentation -
POD.
directory "{MACPERL}"pod:
setfile -c '…uck' ‰.pod ## That's a capital sigma, not an F. Use ResEdit and copy
the 4 bytes.
directory "{MACPERL}"lib:
for ddd in `files -r -d -f`
directory "{ddd}"
setfile -c '…uck' ‰.pm
setfile -c 'MPS ' ‰.pl
end
--
-> From the U S of A, the only socialist country that refuses to admit it. <-