U
un
I'm trying to learn mod_perl 2
I've created the following script:
package smmod;
use strict;
use warnings;
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Const -compile => qw(OK);
sub handler {
my $r = shift;
$r->headers_out->add('Set-Cookie' => 'myCookie=vanilla'); # BUG ?
$r->content_type('text/plain');
$r->print("Hello");
return Apache::OK;
}
1;
And I've added the following to my apache conf file:
PerlModule smmod
<Location /sm>
SetHandler modperl
PerlResponseHandler smmod
</Location>
Yet I keep getting this error when I use the script:
[Thu Oct 14 19:42:56 2004] [error] [client XXXX] Can't locate object method
"add" via package "APR::Table" at C:/Program Files/Apache
Group/Apache2/lib/perl/smmod.pm line 13.\n
It's probably simple, but I'm not able to figure out what's wrong. Anybody?
Thanks in advance
I've created the following script:
package smmod;
use strict;
use warnings;
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Const -compile => qw(OK);
sub handler {
my $r = shift;
$r->headers_out->add('Set-Cookie' => 'myCookie=vanilla'); # BUG ?
$r->content_type('text/plain');
$r->print("Hello");
return Apache::OK;
}
1;
And I've added the following to my apache conf file:
PerlModule smmod
<Location /sm>
SetHandler modperl
PerlResponseHandler smmod
</Location>
Yet I keep getting this error when I use the script:
[Thu Oct 14 19:42:56 2004] [error] [client XXXX] Can't locate object method
"add" via package "APR::Table" at C:/Program Files/Apache
Group/Apache2/lib/perl/smmod.pm line 13.\n
It's probably simple, but I'm not able to figure out what's wrong. Anybody?
Thanks in advance