Hi
I am new to mod-perl and am trying to migrate some pretty large image scripts I have written to mod-perl.
I am attempting first to ge them to run correctly under.
Apache::PerlRum
The scripts run, but sometimes through server errors.
I am getting the following errors.

[Tue Oct 23 06:57:27 2001] [error] PerlRun: `Not a CODE reference at /home/usr1/digital/membersurl/perl/content_manager/handler.pl line 57.'

[Tue Oct 23 06:57:27 2001] [error] Can't locate object method "uri" via package "Apache::PerlRun" at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/PerlRun.pm line 212.

Here is the code at line 57 in the script I have written handler.pl

&assign_values(&get_file("vars/variables.info"));

It calls these two subs to load variables into the script.

#########################################################################################
sub get_file {
my $file_name = shift;
my @array;
open (IFH, "$file_name") || &error("Cannot open $file_name for get.","$!");
 @array = <IFH>;
close IFH;
return @array;
}
####################################################################################################
sub assign_values {
my @array = @_;
foreach (@array) {
 my $name = "";
 my $value = "";
 chomp;
 ($name, $value) = split(/=/);
 $value =~ tr/+/ /;
 $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
 $value =~ s/<!--(.|\n)*-->//g;
 $VAR{$name} = $value;
}
return 1;
}
####################################################################################################

I can't find out why I am getting these errors.  I can usually do an imediate refresh of the browser and the script will run ok.

I am trying to get the scripts to run under apache::perl.

Would it be easier to migrate straight over to apache::registry?

Thanks

John michael

 

Reply via email to