Hi,
I am trying to mix Mason and Embperl and have a problem with inserting
data into %fdat by the script.
I am not sure, if my problem (see below) is triggered by Mason or
Embperl.
My setup: Apache 1.2.13, mod_perl 1.24 not DSO, Embperl 1.3.1, Mason
1.0.
index.html is parsed by mason; mason puts a navigation around the
index.html:
-------------- index.html -----
<%init>
use HTML::Embperl;
my $out="";
HTML::Embperl::Execute({inputfile=>"/some/dir/formular.epl",fdat=>\%ARGS,output=>\$out});
</%init>
<% $out %>
-------------- end index.html ---------
So mason calls Embperl, executes formular.epl and returns the output.
In formular.epl I read a file and insert these data into %fdat for
further form processing.
So I do (pseudo code):
foreach $key (keys %filehash) {
$fdat{$key}=$filehash{$key}
}
Then I have a form to proceed to the next step and pass %fdat via
[$hidden$]
The problem: my inserted data is not passed to the next page.
I tried to insert the following code inside the foreach loop:
$f=0;
foreach $i (0..$#ffld) {
if($ffld[$i] eq "${bereich}_${key}") {
$f=1;
}
}
if ($f == 0) {
push @ffld, "${bereich}_${key}";
}
This helped, but sometimes the data in %fdat gets doubled, so all fields
are stored twice and Data::Dumper show only ARRAY(0x...), no more
values.
Long story, short question: What is the right way to insert data into
%fdat?
Tschuess,
Dirk Melchers.
-------------------------------------------------------------------------
Dirk Melchers NUREG Neue Medien Fon +49 911
32002-256
[EMAIL PROTECTED] Dorfäckerstrasse 31 Fax +49 911
32002-299
http://www.nureg.de D-90427 Nürnberg Mobil +49 172 935 46
70
-------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]