ktrails has asked for the wisdom of the Perl Monks concerning the following question:
I have some cgi scripts that run without errors when I do not have mod_perl2 installed on apache22.
Three scripts are involved: template_editor_a.cgi template_editor_b.cgi editor.cgi, containing shared functions
I put template_editor_a.cgi in package A; template_editor_b in package B; editor.cgi in pacakge C.
I am calling C::build(\@data, $rec) from package A and from package B.
If I restart the webserver and execute template_editor_a.cgi, the call is fine, and my form shows.
If I execute template_editor_b.cgi, I get an error on C::build sayiing 'Type of arg1 to C::build must be array (not reference constructor) at line X of template_editor_b.cgi.
If I now restart the web server, executing template_editor_b.cgi works fine, but when I execute template_editor_a.cgi, I now get 'Type of arg1 to C::build must be array (not reference constructor) at line Y of template_editor_a.cgi.
I can post the code, but here's the pertinent bits (I hope). Any ideas what's happening? The actual error message is posted at the end many thanks, -jeff
Sat Jan 07 03:50:18 2012 error Type of arg 1 to C::build must be array (not reference constructor) at /www/localhost/cgi-bin/template_editor_a.cgi line 67, near "$wddx) "\npackage A; use strict; … my @array1 = qw(name display file recur msglist); my $rec = new WDDX; … my $listrec = C::build(\@array1, $rec); --- package B; use strict; … my @array2 = qw(name display file recur msglist); my $rec = new WDDX; … my $listrec = C::build(\@array2, $rec); … package C; sub build(\@$); sub build(\@$) { my $data = $_[0]; my $rec = $_[1]; … }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mod_perl2 seems to affect subsequent calls to shared script
by CountZero (Bishop) on Jan 07, 2012 at 19:29 UTC | |
by ktrails (Initiate) on Jan 07, 2012 at 23:11 UTC | |
by ktrails (Initiate) on Jan 07, 2012 at 22:39 UTC |