in reply to Re: Re: Re: br tag in CGI.pm V2.91
in thread br tag in CGI.pm V2.91
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:
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).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; }
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: br tag in CGI.pm V2.91
by BrowserUk (Patriarch) on Apr 10, 2003 at 08:21 UTC | |
by cLive ;-) (Prior) on Apr 10, 2003 at 17:55 UTC | |
by BrowserUk (Patriarch) on Apr 10, 2003 at 20:34 UTC |