Perl Code Broken

We were getting close to turn on some software we developed last year. The last piece we forgot about was the piece that automatically ran the jobs on a weekly basis. I negotiated the timing of the jobs with other stakeholders. Then I figured out some cron job entries to make these jobs wake up at the right time. Last piece was to test the cron job runs in development.

At first, I scheduled the simple job to run. The thing bombed because it could not find an include file. That seemed odd. The file was in the same directory as the Perl script that was running. But that directory was not in the @INC path. Why not? I thought this had worked before. It actually works when I run the job manually.

Upon further inspection, I found that the profile that was run when the cron job executes had a bug. It was not setting the PERL5LIB directory correctly, which in turn would get added to the @INC array. That was too much details for somebody who is not a Perl programmer. But hey. I guess this was a small opportunity to learn something.