Try the command perldoc -l Image::Grab to show you where the module got installed, I'm guessing that that path isn't one of the @INC directories listed at the top of your post. Setting the right PATH isn't always enough if you've got custom entries added to @INC via something like the PERL5LIB environment variable, because then that environment variable needs to be set in the environment that cron provides to the programs it runs. I'm still just guessing, but probably that isn't the case and the environment provided by cron is different from the one you have on the command line. For example, are you using local::lib? If you want to see the difference, try running this command from both the command line and from a crontab entry: perl -le 'die "$ENV{PERL5LIB} @INC\n"'
If those are different, then it depends on how you're changing @INC for the best way to solve this. If you could report back with the results of the above, we can probably help more.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|