perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luiz Fernando B. Ribeiro" <l...@engenhosolucoes.com.br>
Subject Re: Another "auto-fill from %fdat" problem
Date Wed, 03 Nov 2004 15:35:48 GMT
On Wed, 03 Nov 2004 15:29:26 +0100, Torsten Luettgert
<t.luettgert@pressestimmen.de> wrote:

> Hi,
>
> I just hit another problem. I'd expect the following code
>
> [- %fdat = ('number' => '0'); -]
> <input type="text" name="number">
>
> to give me a text field with a pre-filled zero inside, but
> instead I get an empty one. It works with values != 0, though.
>
> Apparently $fdat{$fieldname} is only checked
> for being "true". I suppose one can fix this in the syntax,
> but the perlcode parts are beyond my comprehension.
>
> Any help?

The %fdat hash is magical, since its a tied hash. I have not tried but
does it work if you use the following instead?

[- $fdat{'number'} = '0'); -]
<input type="text" name="number">

-- 
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136

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


Mime
View raw message