in reply to Re: What's the REAL DEAL with Perl $cgi->checkbox()
in thread What's the REAL DEAL with Perl $cgi->checkbox()

You probably know this but I want to further the discussion for hysterical historical consideration. FWIW, I don’t find this weird or crufty; it’s perfectly logical and consistent with HTML. checked is either there or not in an input[type=checkbox]. It’s not a key with a value, it’s just there. Giving it a value of undef or 0 is meaningless because it takes no value and you’re still giving it the “key” attribute. CGI being removed has more to do with there being better, c.f. more maintainable alternatives and not wanting to be seen as encouraging 1990s’ web dev practices out of the box. There is no package in any language that does what it does better or with more DWIWness. It’s just not a good way to do big code projects. If you know it well though it’s still an excellent, rapid choice for one-offs or tests. Wrapping in PSGI is easy now too.

(To pedantic anonymonks itching to shoot: I know checked="checked".)

Replies are listed 'Best First'.
Re^3: What's the REAL DEAL with Perl $cgi->checkbox()
by kennethk (Abbot) on Feb 03, 2015 at 21:22 UTC
    I quite agree with all the above. By "weird accumulated crufty behavior" I didn't intend to say all this behavior was necessarily the Perl community's fault. The Web is a wildly different place than when people crafted in raw HTML, and modern frameworks are built around making GUI's, not publishing documents. The base technology hasn't changed, but the expectations have.

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

      Sorry a million pardons- I ALWAYS make a point of thanking kind monks who donate, with no expectations, their valuable time to assist me.

      I was looking over some past inquiries, found this one, and noted that although I read and gained insight into my issue, I had totally failed to thank each person who replied.

      I may ask some dumb questions at times, but I'm more than thankful for the answers. If any of my other inquiries went unthanked, it was unintentional. Most likely my boss sidetracked me mid-thank..

      As penance I wish EACH of you a great weekend!

      Mr P