Hi,

It seems  %fdat got messed up when calling Execute() from within a cgi
script:

test.cgi:
--------------------------------------
#!/usr/bin/perl
use HTML::Embperl;        # Version 1.2
use CGI;                                # Version 2.56

$q = CGI::new;
print $q->header;

%fdat = ( a, 1 );      # a = 1 always!!!

HTML::Embperl::Execute ( { 'inputfile' => 'test.tpl' , 'fdat' => \%fdat
} );
--------------------------------------

test.tpl:
--------------------------------------
<form enctype="multipart/form-data" action="/cgi-bin/test.cgi">
<input name=a><input type=submit>
a=[+ $fdat{'a'} +]
</form>
--------------------------------------

I would expect to have  input field defaulted to '1' no matter what,
but it sports the value I entered to the field in previous submit.

It works as expected when I remove the  attribute
'enctype="multipart/form-data"'

Is this a bug or have I missed something?

Thanks,
Nhan

Reply via email to