|Perl: the Markov chain saw|
infinite loop bluesby jynx (Priest)
|on Jun 26, 2003 at 20:57 UTC||Need Help??|
jynx has asked for the
wisdom of the Perl Monks concerning the following question:
i've been working with OOP for a while now, and i think i'm getting the hang of it. Then yesterday i came across a problem that i thought would be simple to fix, and it being 10 minutes to 5 left it for the next day. Today i came in, sat down, and have proceeded to spend all day not figuring out what's going wrong.
So here's the rundown, i have a class server.pm that uses a bunch of functions in the directory called functions. The server class has an AUTOLOAD function so that of the myriad of things that the server can do, it does not need to load in all of its functions.
i got the server and all of it's functions working, added a function, everything continued to work, added another function, and everything fell apart. Somehow the server is infinite looping while trying to get to the new function. Doing a perl debug tells me that everytime it gets to the magical goto &$method rather than going to the function correctly (like it does with all other functions) it goes back to the top of the AUTOLOAD method. Even worse is that all of the variables are correct. Following is the code along with a few comments that should illistrate what's happening (according to 'perl -d').
i don't think it should be necessary to post any other code, but if i've made an assumption or if something isn't obvious just tell me what i need to post and i'll put it up. Also, in case it matters, i'm running this on a Solaris 9 box using Perl 5.8.0, but the code should be platform independant (although i can't vouch for perl 5.6.x compliant).
What confuses me most is that the AUTOLOAD method works for every other function that i've handed to it, and it doesn't seem to be the naming convention or improper variable content or anything else i can think of that's screwing this one method call up. So, to those monks who are just itching for something bizaare to deal with, could you please tell me what's going on? Also, how should i go about fixing this? i'm stumped...