perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cees Hek <>
Subject Apache::Request problem (possible bug)
Date Fri, 06 Apr 2001 15:07:11 GMT

Either I've found a problem with Apache::Request, or I don't know what I'm
doing :)

Setting variables with $r->param() doesn't seem to work for array
references.  ie the following line from the man page doesn't work

$r->param('foo' => [qw(one two three)]);

When you look at foo afterwards it returns the string 'ARRAY(0x8c04fd8)'
instead of an actual reference to the array.  

I have include a basic handler that demostrates this on my machine
(Apache/1.3.17 mod_perl/1.24 perl 5.005_03)

package Apache::Test;
# File: Apache/

use strict;
use Apache::Constants qw(:common);
use Apache::Request ();

sub handler {
	my $r = new Apache::Request(shift);


	my @list = $r->param('list');

	$r->param('newlist' => [qw(one two three)]);

	my @newlist = $r->param('newlist');

	my $list = join ', ', @list;
	my $newlist = join ', ', @newlist;
	print <<"EOM";

list - $list<BR>
newlist - $newlist<BR>
<INPUT TYPE="submit">

return OK;


Cees Hek
SiteSuite Corporation

View raw message