in reply to Re: Perl app won't compile /run from cron
in thread Perl app won't compile /run from cron

Hi I tried  perldoc -l Image::Grab but I don't have perldoc installed.
I am not using local::lib.
I used the cron commmand
* * * * * /usr/bin/perl /home/user/perl_script.pl 1 2>&1 | /usr/bin/ +logger -t test_cron
to get the compiler error output from syslog.

Dazz

Replies are listed 'Best First'.
Re^3: Perl app won't compile /run from cron
by haukex (Archbishop) on May 25, 2018 at 12:17 UTC
    I am not using local::lib.

    Based on the pathname ~/perl5/lib/perl5 and that you say you used cpan to install the module, I'm pretty sure you are using local::lib. The cpan client, when run without sudo, will usually detect that it doesn't have permissions to write to the system directories and autoconfigure to use local::lib. If you check your .profile or .bashrc files, you should see variables like PERL_LOCAL_LIB_ROOT and PERL5LIB being set there, these would have been added there by local::lib, and as I said those are the variables that are probably missing from the environment that cron provides, hence my suggestion to try and set PERL5LIB explicitly.

    I tried perldoc -l Image::Grab but I don't have perldoc installed.

    Well, you could do sudo apt-get install perl-doc, but did you try dave_the_m's suggestion, which should work even without perldoc? I also made a few other suggestions and asked a few questions above as well as here.

Re^3: Perl app won't compile /run from cron
by hippo (Archbishop) on May 25, 2018 at 09:56 UTC
    I tried perldoc -l Image::Grab but I don't have perldoc installed.
    locate Image/Grab.pm