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

Re: [MacPerl] MacPerl Tool Questions



Here's a startup script I use to set things up for the MPW
perl tool.  Put this in your MPW "Startup Items" folder. It
will set appropriate variables after you tell it where your
MacPerl folder is.

----------- cut here -----------
# UserStartup*Perl

set pathFile                    "{mpw}"Perl_Folder

if Not `Exists "{pathFile}"`
        echo "{mpw}MacPerl:" > "{pathFile}"
end

set -e MacPerl  "`catenate "{pathFile}"`"

if Not `Exists -d "{MacPerl}"`
        # Prompt user for correct pathname to MacPerl
        set exit 0
        set tmp `GetFileName -d -m "Select 'MacPerl folder'"` ³ dev:null
        set exit 1
        if "{tmp}"==""
                exit 1
                break
        end

        if {status} != 0
                Alert "MacPerl:   Problem configuring..."
                exit 2
        else
                echo "{tmp}" > "{pathFile}"
                set MacPerl     "`catenate "{pathFile}"`"
        end
end

set commands "{commands},{MacPerl}"

set -e PERLLIB "{MacPerl}lib:"

unset pathFile
unset tmp

----------- cut here -----------