Return-Path: Delivered-To: apmail-modperl-archive@apache.org Received: (qmail 26665 invoked by uid 500); 6 Apr 2001 04:00:31 -0000 Mailing-List: contact modperl-help@apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@apache.org Received: (qmail 26653 invoked from network); 6 Apr 2001 04:00:30 -0000 Date: Sat, 7 Apr 2001 01:07:11 +1000 From: Cees Hek To: modperl@apache.org Subject: Apache::Request problem (possible bug) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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 correctly $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/Test.pm use strict; use Apache::Constants qw(:common); use Apache::Request (); sub handler { my $r = new Apache::Request(shift); $r->content_type('text/html'); $r->send_http_header(); 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
newlist - $newlist

EOM return OK; } 1; -- Cees Hek SiteSuite Corporation cees@sitesuite.net