I'm having the same issue, however I'm trying to launch the script at startup and I prefer to use launchd (much as I like/use cron on Linux it's being phased out on Mac). So far I have included all the @INC paths and I am running my perl script from a bash script that contains the result of perl -le 'print q{PERL5LIB=}, join(":",grep /w/, @INC)' (to try and obtain the equivalent effect of pasting it on top of the crontab). How can I make this work using launchd? I can use any instance of launchd /System/Library/LaunchAgent, /Library/LauncAgent, or ~/Library/LaunchAgent. I am currently using the latter and have not tried using the root ones ( and all of the testing is done using launchctl load without being root - though I don't see how this would make a difference ). My Mac is running Snow Leopard.
Additional details follow.
- Error output from launchd:
Can't load '/opt/local/lib/perl5/5.8.9/darwin-2level/auto/Fcntl/Fcntl. +bundle' for module Fcntl: dlopen(/opt/local/lib/perl5/5.8.9/darwin-2l +evel/auto/Fcntl/Fcntl.bundle, 1): Symbol not found: _PL_curpad Referenced from: /opt/local/lib/perl5/5.8.9/darwin-2level/auto/Fcntl +/Fcntl.bundle Expected in: dynamic lookup at /opt/local/lib/perl5/5.8.9/darwin-2level/Fcntl.pm line 215 BEGIN failed--compilation aborted at /opt/local/lib/perl5/5.8.9/darwin +-2level/Fcntl.pm line 216. Compilation failed in require at /Users/rgr/wallpaper/cal.pl line 14. BEGIN failed--compilation aborted at /Users/rgr/wallpaper/cal.pl line +14.
I've looked in the perl libraries for the source of the problem, darwin-2level/Fcntl.pm line 215:
214 BEGIN { 215 XSLoader::load 'Fcntl', $VERSION; 216 }
The Perl documentation concerning this error from XSLoader: " As the message says, some symbols stay undefined although the extension module was correctly loaded and initialised. The list of undefined symbols follows." (
).+bundle' for module Fcntl: dlopen(/opt/local/lib/perl5/5.8.9/darwin-2 +l +evel/auto/Fcntl/Fcntl.bundle, 1): Symbol not found: _PL_curpad
I've opened darwin-2level/auto/Fcntl/Fcntl.bundle but it isn't human readable (save a few words here and there including _PL_curpad that I've searched).
The Perl script I'm trying to run is a modified version of jtrue's excellent script to superpose a calendar on the desktop image.
In reply to Re: Cron can't find a module in OSX
by Anonymous Monk
in thread Cron can't find a module in OSX
by true
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |