Ho il seguente semplice AppleScript che chiama uno script perl che ho scritto per pulire il desktop:
do shell script "/Users/stevied/bin/clean_desktop.pl"
Lo script funziona bene quando viene eseguito dalla riga di comando, ma quando si esegue lo script dal mio AppleScript, i moduli I use
non vengono trovati e ottengo questo errore:
Can't locate Modern/Perl.pm in @INC (you may need to install the Modern::Perl module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Users/stevied/bin/clean_desktop.pl line 3. BEGIN failed--compilation aborted at /Users/stevied/bin/clean_desktop.pl line 3.
Ho installato perlbrew. La riga corrente di shebang per lo script perl è:
#! /usr/bin/env perl