I'm not sure if this is a problem with the configuration of the Mac os X (panther, 10.3.3) system, or the way I'm using this module.
Perl v5.8.3, Mac::etc modules are up-to-date with CPAN.
The why is long; basically, I have a program I want to run periodically via cron on this Mac. Under certain conditions, I want to pop-up a dialog to notify the user. Here's the test case:
#!/usr/bin/perl
use diagnostics;
use strict;
use Mac::Notification;
my($foo) = new NMRec( nmStr => "hello world" );
NMInstall($foo);
sleep(10);
exit;
Runs perfectly, no whining/warnings. Dialog appears. Dialog can be dismissed, or it goes way after 10 seconds when Perl cleans up...
Next I try to run the test case from cron. I've tried this as the user who is currently logged onto the Mac, and as the 'root' user. In both cases, I'm getting the error message output via cron. Excerpt:
RegisterProcess failed (error = -50)
Now for the curveball. The Mac is using postfix for it's mail daemon and postfix (which I don't understand all) is throwing the output in a mail spool directory and it has high-ascii characters in it... So I'm not sure if there's reall a space in RegisterProcess (for example), or some other hairy detail in the error message that I just can't make out.
Since it works command line, and the modules load under cron, I'm guessing this is some sort of "security" issue where I'm not being allowed (by the mac os) to use the notification manager from cron.
Any help?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.