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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.