Have you tried using Apache::Request instead of CGI?. It also has a similar API to CGI, and if youre running mod_perl, you should be using Apache::Request :)
Check out: http://search.cpan.org/~joesuf/libapreq-1.3/Request/Request.pm -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Mark Stosberg Sent: Saturday, February 28, 2004 8:41 AM To: [EMAIL PROTECTED] Subject: Help requested with CGI.pm/Data::FormValidator/modperl bug Hello, I maintain the popular Data::FormValidator module, and am just starting to use modperl myself. A couple of my users spotted a modperl-related bug in the module. I've read the "CGI porting" document about basic modperl traps, but I can't figure this out. I have a test script for the issue below. When run with "-X", it gives a different result on the second load. However, I'm not aware of global variables in use, and I'm not getting the "won't stay shared warning". Any pointers to help debug this will be appreciated by myself and the other DFV/modperl users. BTW, the issue only happens with a CGI.pm object as input. Using a regular hashref doesn't trigger it. Thanks! Mark -- http://mark.stosberg.com/ ########################### #!/usr/bin/perl -w use strict; use CGI; use Data::FormValidator; use Data::Dumper; my $r = Data::FormValidator->check(CGI->new('note=2003'), {required=>[qw(note)]}); print "Content-type: text/html\n\n"; print "reality check: ".`date`; print "<pre>". Dumper('r',$r).'</pre><p>'; if (ref $r->valid('note') eq 'ARRAY' ) { print "note is arrayref (but shouldn't be)"; } else { print "note isn't arrayref (correct)"; } exit; ###################### First load: reality check: Sat Feb 28 11:28:56 EST 2004 $VAR1 = 'r'; $VAR2 = bless( { 'profile' => { 'defaults' => {}, 'dependencies' => {}, 'dependency_groups' => {}, 'constraints' => {}, 'constraint_regexp_map' => {}, 'required' => [ 'note' ], 'require_some' => {}, 'field_filter_regexp_map' => {}, 'field_filters' => {} }, 'validate_invalid' => [], '__INPUT_DATA' => bless( { '.parameters' => [ 'note' ], '.charset' => 'ISO-8859-1', '.r' => bless( do{\(my $o = 137736244)}, 'Apache' ), '.fieldnames' => {}, 'note' => [ '2003' ], 'escape' => 1 }, 'CGI' ), 'unknown' => {}, 'missing' => {}, 'valid' => { 'note' => '2003' } }, 'Data::FormValidator::Results' ); note isn't arrayref (correct) ####################### Second load: reality check: Sat Feb 28 11:29:03 EST 2004 $VAR1 = 'r'; $VAR2 = bless( { 'profile' => { 'defaults' => {}, 'dependencies' => {}, 'dependency_groups' => {}, 'constraints' => {}, 'constraint_regexp_map' => {}, 'required' => [ 'note' ], 'require_some' => {}, 'field_filter_regexp_map' => {}, 'field_filters' => {} }, 'validate_invalid' => [], '__INPUT_DATA' => bless( { '.parameters' => [ 'note' ], '.charset' => 'ISO-8859-1', '.r' => bless( do{\(my $o = 137736244)}, 'Apache' ), '.fieldnames' => {}, 'note' => [ '2003' ], 'escape' => 1 }, 'CGI' ), 'unknown' => { '.parameters' => 1, '.r' => 1, '.charset' => 1, '.fieldnames' => 1, 'escape' => 1 }, 'missing' => {}, 'valid' => { 'note' => $VAR2->{'__INPUT_DATA'}{'note'} } }, 'Data::FormValidator::Results' ); note is arrayref (but shouldn't be) -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html