perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Gunton <n...@nilspace.com>
Subject Re: [$ hidden $] bug in 2.0?
Date Tue, 26 Jul 2005 14:48:08 GMT
Gerald Richter wrote:
>>I am having a problem with one of my forms under Embperl 
>>2.0rc4, which works under 1.3.6.
>>
>>Here is a minimal case:
>>
>>[- $fdat{xxx} = 'xxx' -]
> 
> 
> Add
> 
> [- @ffld = keys %fdat -]
> 
> 
>><FORM>
>>    [$ hidden $]
>></FORM>
>>
>>This does not produce any hidden value for 'xxx'. It does under 1.3.
>>
>>Setup is Slackware 10.1, apache 1.3.33, mod_perl 1.29.
>>
>>Any ideas? Is this a bug, or intentionally changed behavior?
> 
> 
> 
> Should behave the same in Embperl 1.3, if not it is an bug in Embperl 1.3
> (as you know @ffld gets automaticly setup for parameters posted to the page,
> so maybe your testcase are slightly different for 2.0 and 1.3?)

No, this works when I enable 1.3 and it doesn't work when I enable 2.0. Under 1.3.6, if you
set a 
variable in %fdat anywhere prior to the [$hidden$], then this will get included in the [$hidden$]

set if the variable was not previously explicitly expressed in the form.

In both the Embperl 1.3 and 2.0 documentation, under the [$hidden$] section, it doesn't mention

@ffld at all (though it may elsewhere) - it simply says that the "default used for the first
hash is 
%fdat":

http://perl.apache.org/embperl/pod/doc/doc13/HTML/Embperl.-page-7-.htm
http://perl.apache.org/embperl/pod/doc/Embperl.-page-3-.htm

So I just put stuff in %fdat if I want it included in hidden fields automatically.

I think anyone reading this would have reasonably assumed that the way to
"communicate" additional fields to Embperl for the [$hidden$] command would simply add the
variables 
to %fdat, since that is the only one mentioned (and it says it's the default) in the [$hidden$]
section.

I have a *lot* of code that works using %fdat. Isn't it possible (and desirable) to make 2.0
behave 
in the same way that 1.3 did, for purposes of backward compatibility? I guess backward compatibility

includes quirks that perhaps you didn't intend, but I don't really see how this one is so
harmful. I 
don't really see why it should be necessary to use two variables (fdat and ffld) when one
seemed to 
do the job quite well before.

Just my opinion as a user of course...

Thanks!

-Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message