in reply to Re: Tied HASH as boolean?!
in thread Tied HASH as boolean?!
But this is just to enable the end user (a Perl programmer) to use that hash as a normal hash in the framework! But it actually don't know when it's tied or not, since I only tie it to can see the keys of 2 different HASHes at the same time.
Just to know the story. This is for HPL (that I will release for the public soon). When you have POST or GET inputs, they are parsed and stored in the HASHes %POST and %GET (since you can send the both at the same time). But from previous versions this were in the HASH %FORM. Now the HASH %FORM still exists, and is just an alias in the table entry to %POST or %GET, depending of the situation. But when you have the both, %FORM need to have the content of %GET and %POST at the same time, so, I tie it and make it work/look in the 2 HASHes, insted of just copy the content (what is wrong).
But the user really need to can test if %FORM is true, since this code is very usual to know if you have formulary inouts:
if ( %FORM ) { ...response... } else { ...show the formulary... }
Graciliano M. P.
"The creativity is the expression of the liberty".
|
|---|