There's more than one way to do things | |
PerlMonks |
Origin of 'md5sum' and 'sh' logsby drw (Novice) |
on Feb 26, 2019 at 00:02 UTC ( [id://1230539]=perlquestion: print w/replies, xml ) | Need Help?? |
drw has asked for the wisdom of the Perl Monks concerning the following question: Edit: I have identified the error (Thanks bliako). I was not using the explicit $exception->{exception} value and this was causing the confusion/inconsistencies in the code. Please excuse me for the confusing indentations and format on this post. I tried to edit down the original code to something more readable, but failed miserably at it. Thank you everyone for the advice as well, it is very appreciated. Couldn't figure out a way to search this problem, so I apologize if it has been answered before. Additionally, I am very new to perl, excuse me if i overlook something obvious. I am working on creating an email alert for a data load that goes through every day at my company. There are a number of modules that do essentially the same thing a few different ways for the different sets of data. What I was tasked to do is create alerts whenever the data is not loading properly, specifically when the file does not exist. This was pretty simple to start, but I've hit a roadblock for a few of the modules. Currently I have a subroutine that reads:
The $exceptions are returned to one of the main modules (whichever is currently being used) and proceeds to run down its every day instructions. I have implemented another if statement to check if the returned $exception is "nonexistent": The majority of the results are exactly what I need. The script fails, a log stating that the $filepath does not exist, and an email is sent out to our alerts queue (this is done in the main module that organizes all the others.) What I am getting with two of them, is instead of proceeding the normal way, I get these logs:
The script continues to attempt to load the data, but hits a number of issues as the file path does not exist. I am not sure why two of the modules are creating these logs instead what is instructed, but the other modules will simple generate the error and email and then end. Any thoughts on where to look for trouble shooting this error, or maybe some kind of explanation of why the -e command is generating these md5sum and sh logs?
Back to
Seekers of Perl Wisdom
|
|