Update: this is actually redundant This Node has a better explanation...

If it were only that simple :) If you'd looked above these lines, you would have seen that they were within the 'checkbox_group' and 'radio_group' subs (although I think your line number is off in the second case). You need to do a little less casual grepping :)

After a little play, I think I've narrowed it down to (and sent a note to Lincoln explaining my thoughts) this sub:

sub _make_tag_func { my ($self,$tagname) = @_; my $func = qq( sub $tagname { shift if \$_[0] && (ref(\$_[0]) && (substr(ref(\$_[0]),0,3) eq 'CGI' || UNIVERSAL::isa(\$_[0],'CGI'))); my(\$attr) = ''; if (ref(\$_[0]) && ref(\$_[0]) eq 'HASH') { my(\@attr) = make_attributes(shift()||undef,1); \$attr = " \@attr" if \@attr; } ); if ($tagname=~/start_(\w+)/i) { $func .= qq! return "<\L$1\E\$attr>";} !; } elsif ($tagname=~/end_(\w+)/i) { $func .= qq! return "<\L/$1\E>"; } !; } else { $func .= qq# return \$XHTML ? "\L<$tagname\E\$attr />" : "\L<$tagname\E\$at +tr>" unless \@_; my(\$tag,\$untag) = ("\L<$tagname\E\$attr>","\L</$tagname>\E") +; my \@result = map { "\$tag\$_\$untag" } (ref(\$_[0]) eq 'ARRAY') ? \@{\$_[0]} : +"\@_"; return "\@result"; }#; } return $func; }
My guess is that \@_ is always true at the moment, so it never tries to create the XHTML non-container element (it's a little easier to see if you dump the output of the compiled br sub).

cLive ;-)


In reply to Re: br tag in CGI.pm V2.91 by cLive ;-)
in thread br tag in CGI.pm V2.91 by cLive ;-)

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.