[tpm] Net::SCP and Net::SFTP modules
Henry.Baragar at instantiated.ca
Tue Nov 11 13:02:07 PST 2008
For the record, I solved my problems by switching to Net::SSH2::SFTP.
On Sunday, November 09 2008 07:10 pm, Richard Dice wrote:
> On Sun, Nov 9, 2008 at 6:23 PM, Henry Baragar
> <Henry.Baragar at instantiated.ca
> > wrote:
> > I have been trying to use Net::SFTP: it works when I run the application
> > from
> > the shell, but not under cron!
> Cron as your user, or cron as the system cron?
> cron provides a huge dearth of environment variables and other things that
> might be set up by your .login or .bashrc file. My guess is that there is
> something being provided by an envvar, shell alias, _something_ in your
> personal environment that your Perl program somehow depends upon. Or it
> might be something as simple as directory permissions and how they apply in
> the context of the system cron user. (might be root, might be cron, might
> be something else)
> That debugging message hardly seems helpful, as it is telling where in the
> stack of depended-upon modules the failure occurs at. You should build
> some debugging / error trapping (eval) code around each line in your
> subroutine there to see where the failure actually occurs at from the
> perspective of your program. From there you can try to figure out how it
> is different when run as yourself and when run as cron.
> - Richard
More information about the toronto-pm