Dear mod_perl'ers!

I have found strange difference between object and func modes of CGI
library. More precisely - I have a problem with Vars function.

Let me show an example:

#!/usr/bin/perl -w

use Data::Dumper;

use CGI;
my $q = new CGI;
my $args = $q->Vars;
#use CGI qw(:standard :cgi-lib);
#my $args = Vars;

print
  header,
  start_html,
  p( Dumper( $args ) ),
  start_form( -method => "POST", -action => "/~barancev/cgi-perl/test.pl" ),
  textfield( -name => "name", -size => 50 ),
  submit( -name => "submit", -value => "Submit" ), submit( -name => "cancel", -value 
=> "Cancel" ),
  end_form,
  end_html;

All works ok, when I click button I see what button was pressed and
what string was entered.

But if I try functional way instead (commented in example) I see that
$args is empty! In single-process mode (httpd -X) both examples work
right. Why?

(BTW, both examples was tried on clean, just started Apache)

-- 
ab
ICQ: 3959207

Reply via email to