omegaweaponZ has asked for the wisdom of the Perl Monks concerning the following question:
"Can't locate object method "events" via package "Class::ReturnValue" at /script.pl line 60.
Line 60 is the code below:
So its somehow thinking I'm using the Class::ReturnValue of the $cal variable instead of the Data::ICal module, but again, this only happens on the crontab, manual launch works fine. I have various other modules on other scripts that work fine on a crontab, but this is the only one that has failed. No special formatting or directory changes occur here...so I'm stumped. Any ideas? Please see sample script below:my @events1 = $cal->events($span);
#!/usr/bin/perl use strict; use Data::ICal::DateTime; my $date1 = DateTime->new( year => 2012); my $date2 = DateTime->new( year => 2013); my $span = DateTime::Span->from_datetimes( start => $date1, end => $d +ate2 ); my $cal = Data::ICal->new(filename => 'Calendar.ics'); my @events1 = $cal->events($span); foreach my $event (@events1) { my $summary = $event->summary; my $start = $event->start; my $end = $event->end; # Continue sql insertion next...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl module not working in crontab
by ikegami (Patriarch) on Jan 03, 2012 at 01:24 UTC | |
by omegaweaponZ (Beadle) on Jan 03, 2012 at 02:15 UTC | |
by i5513 (Pilgrim) on Jan 03, 2012 at 05:33 UTC | |
|
Re: perl module not working in crontab
by toolic (Bishop) on Jan 03, 2012 at 01:00 UTC | |
|
Re: perl module not working in crontab
by JavaFan (Canon) on Jan 03, 2012 at 00:57 UTC | |
|
Re: perl module not working in crontab
by Anonymous Monk on Jan 03, 2012 at 00:50 UTC | |
|
Re: perl module not working in crontab
by omegaweaponZ (Beadle) on Jan 03, 2012 at 01:17 UTC | |
|
Re: perl module not working in crontab
by locked_user sundialsvc4 (Abbot) on Jan 03, 2012 at 14:58 UTC |