Yea, I got Apache2/MP2 installed and running on my OS X box.

Now I'm rewriting my code and am getting the error:

Can't locate object method "param" via package "Apache2::RequestRec"

Here is what I have:

sub handle {
my $r = shift;
my $c = $r->connection;
my $apr = Apache2::RequestRec->new( $r );
my $data;
foreach my $name ( $apr->param ) {
my $i = 0;
foreach( $apr->param( $name ) ) {
$i++;
}
if( $i == 1 ) {
$data->{$name} = $apr->param( $name );
} elsif( $i > 1 ) {
my @type = $apr->param( $name );
$data->{$name} = [EMAIL PROTECTED];
}
}
}

It used to have:

use Apache::Request;
my $r = shift;
my $apr = Apache::Request->new( $r );
my $data;
foreach my $name ( $apr->param ) {
my $i = 0;
foreach( $apr->param( $name ) ) {
$i++;
}
if( $i == 1 ) {
$data->{$name} = $apr->param( $name );
} elsif( $i > 1 ) {
my @type = $apr->param( $name );
$data->{$name} = [EMAIL PROTECTED];
}
}

What is the equivalent for MP2?
I tried:
perl -MModPerl::MethodLookup -e print_method param

And got no love.

PS Thanks for the help with getting the installs set up correctly. Compared to the first time
I tried to install Apache2/MP2 it was a breeze.

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

Reply via email to