Thanks!

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".


In reply to Re: Re: Tied HASH as boolean?! by gmpassos
in thread Tied HASH as boolean?! by gmpassos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.