when using modperl_handler_make_args with an apr_table, you get back a blessed object, but it's not tied, so you can't use it as a hash and all.
Patch fixes this, but hardcodes APR::Table.? foo Index: lib/Apache/PerlSection.pm =================================================================== RCS file: /home/cvspublic/modperl-2.0/lib/Apache/PerlSection.pm,v retrieving revision 1.1 diff -u -I'$Id' -I'$Revision' -r1.1 PerlSection.pm --- lib/Apache/PerlSection.pm 7 Oct 2002 02:35:18 -0000 1.1 +++ lib/Apache/PerlSection.pm 7 Oct 2002 04:38:21 -0000 @@ -27,7 +27,7 @@ $self = $self->new('parms' => $parms, 'args' => $args); } - my $package = $args->get('package'); + my $package = $args->{'package'}; my $special = $self->SPECIAL_NAME; my $root = ModPerl::Symdump->new($package); Index: src/modules/perl/modperl_cmd.c =================================================================== RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_cmd.c,v retrieving revision 1.32 diff -u -I'$Id' -I'$Revision' -r1.32 modperl_cmd.c --- src/modules/perl/modperl_cmd.c 7 Oct 2002 02:35:18 -0000 1.32 +++ src/modules/perl/modperl_cmd.c 7 Oct 2002 04:38:22 -0000 @@ -371,7 +371,6 @@ } if (handler) { - /*XXX: This will return a blessed APR::Table, but not a tied one ;-( */ modperl_handler_make_args(aTHX_ &args, "Apache::CmdParms", parms, "APR::Table", options, Index: src/modules/perl/modperl_handler.c =================================================================== RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_handler.c,v retrieving revision 1.12 diff -u -I'$Id' -I'$Revision' -r1.12 modperl_handler.c --- src/modules/perl/modperl_handler.c 24 Aug 2002 16:03:27 -0000 1.12 +++ src/modules/perl/modperl_handler.c 7 Oct 2002 04:38:22 -0000 @@ -143,6 +143,11 @@ ptr = va_arg(args, void *); switch (*classname) { + case 'A': + if (strEQ(classname, "APR::Table")) { + sv = modperl_hash_tie(aTHX_ classname, Nullsv, ptr); + break; + } case 'I': if (strEQ(classname, "IV")) { sv = ptr ? newSViv((IV)ptr) : &PL_sv_undef; -- Philippe M. Chiasson <[EMAIL PROTECTED]> eXtropia Pte. Ltd.
signature.asc
Description: This is a digitally signed message part