Quote:
Two different servers get same behaviour. This points that it is related to Perl but what
|
I now suspect the issue is with Perl and the system. I can reproduce the issue as it appears to be happening and I will elaborate below. But I am unsure why it does this.
As I said before there are may POD(s) files, and a main file that has the necessary 'require' to call the necessary subroutines.
In the main file I call a sample subroutine from another POD as follows initially:
Quote:
etc...
&some_function();
etc ...
|
&somefunction depending on the no. of data I get it to process varies over time. &some_function calls other routines in it's PODs.
What I have noticed is that as I increase the no. of data to process, although "&some_function()" gets executed, once it completes to the end, Perl does not seem to know who the caller is anymore and stops there. Through adding debug statements I saw this.
I made changes as follows:
Quote:
sub some_function {
etc ...
etc ...
print "finished routine\n";
return "pass"; /* added this time to see if control goes back to caller */
}
Main routine POD
sub main {
my $result = &some_function(); /* added $result */
print "Control back to main\n";
&some_other_function();
etc ...
exit;
}
|
The print statement in &some_function(); gets executed but the print statement in &main is not executed as is everything else after (&some_other_function() etc ...)
As I said if I reduce the no. of data, the issue is not seen and Perl knows where to send control back. Why does this happen and how can I deal with this ?
I am no Perl guru but hopefully I have given enough information to get some help.
I will try few other things but anyone who has a clue please let me know .
Thank You