A quick read of the CGI.pm source code shows that the tabindex behavior is controlled in two ways: by setting a CGI package global called $TABINDEX, and when you explicitly pass in a -tabindex for each element. The bizarre part is that $TABINDEX is false by default and only gets set to true if -tabindex is passed to the constructor.

You may be able to turn off this behavior by setting $CGI::TABINDEX = 0 from your code, but it really isn't a good idea to muck around with a module's internals like that -- you're better off figuring out why this is happening.

The only explanation for this unexpected behavior that I can think of is that you are using the CGI module in a persistent environment (mod_perl, FastCGI, SpeedyCGI or whatever) and one of your other scripts is using the global -tabindex option, which CGI.pm is failing to reset between invocations for whatever reason.


In reply to Re: CGI.pm and tabindex by dirving
in thread CGI.pm and tabindex by ruzam

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.