I’m not a perl programmer so sorry if this is obvious. There is a perl package on a system I am working on that I want to modify, but I don’t know which other programs are using it. I can tell that at least three cron jobs use it because I put these lines into the file:
open(STDOUT, '>', "/var/log/SS_logs/packageAlert.log");
open(STDERR, '>', "/var/log/SS_logs/packageAlert.error.log");
print "\nThe program packageAlert.pm is running on " . `date` . "\n";
and 10 minutes later I got three lines in my log. There may be more that call it on a daily or weekly basis and it could be called in web pages as well.
I searched for occurrences of the package with grep -R "SS::alert" . so know that there are 20 or so scripts and web pages that may use the package.
Is there a function that I can call to find out which file called the package?