Hi all,
Just started with mod_perl a month ago and still wondering about something.
I had to move my code from my .pm files because when I required them the sub routines weren't accessible from the main program I had now run in mod_perl
I moved them into a library and brought the code in with 'use' and assigned the scalar $standardLibrary to the library so I can get subroutines with $standardLibrary->SubRoutine('test','test2')
But when I bring the information, test & test2 into the sub routine with my usual $test1=shift; $test2=shift; and I print $test2 it will print out the text 'test' instead of the second item I passed to the sub routine. I got it to work by shifting the first element which seems to be nothing.
So my question is why are three items passed when I only want two. I'm worried about this because it's vital it work 100% of the time. Otherwise my database will have fields in the wrong place.
Thanks a lot everyone. if I find the answer first I'll post the fix
Tony
Just started with mod_perl a month ago and still wondering about something.
I had to move my code from my .pm files because when I required them the sub routines weren't accessible from the main program I had now run in mod_perl
I moved them into a library and brought the code in with 'use' and assigned the scalar $standardLibrary to the library so I can get subroutines with $standardLibrary->SubRoutine('test','test2')
But when I bring the information, test & test2 into the sub routine with my usual $test1=shift; $test2=shift; and I print $test2 it will print out the text 'test' instead of the second item I passed to the sub routine. I got it to work by shifting the first element which seems to be nothing.
So my question is why are three items passed when I only want two. I'm worried about this because it's vital it work 100% of the time. Otherwise my database will have fields in the wrong place.
Thanks a lot everyone. if I find the answer first I'll post the fix
Tony