in reply to perl module not working in crontab
Ignore what others say about @INC and PERL5LIB. It's not a problem loading Class::ReturnValue.
The docs say:
Returns a false value upon failure to open or parse the file or data; this false value is a Class::ReturnValue object and can be queried as to its error_message.
so
my $cal = Data::ICal->new(filename => 'Calendar.ics');
should be
my $cal = Data::ICal->new(filename => 'Calendar.ics'); die "Can't open calendar: ".$cal->error_message()."\n" if !$cal;
I bet you'll the problem is that your script can't find Calendar.ics because the current directory isn't what you assume it to be.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl module not working in crontab
by omegaweaponZ (Beadle) on Jan 03, 2012 at 02:15 UTC | |
by i5513 (Pilgrim) on Jan 03, 2012 at 05:33 UTC |