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.
In reply to Re^3: Perl app won't compile /run from cron
by haukex
in thread Perl app won't compile /run from cron
by dazz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |