in reply to div in cgi

#!/usr/bin/perl # DISABLE LEE JOHNSON'S CRIPPLEWARE BEGIN { $SIG{__WARN__} = sub {} } use strict; use warnings; # IGNORE MARTO'S OBSESSIVE COMPULSION use CGI::Pretty ":standard"; # PRINT OUTPUT DESIRED BY THE SEEKER print li("\n\t", div({"class=inforno"},"\n\t\t<img src=''\n\t"),"\n" ),"\n"; __END__ https://www.perlmonks.org/?node_id=1222286 div in cgi. i want to output: <li> <div class=inforno> <img src='' </div> </li>

Replies are listed 'Best First'.
Re^2: div in cgi
by Anonymous Monk on Sep 13, 2018 at 17:35 UTC
    Using CGI::Pretty when you don't need to (should have just used CGI, since the Pretty part does nothing), generating broken HTML. Your mid 90s code style and crappy attitude are don't have a place in the world post 1996.
      > Using CGI::Pretty when you don't need to

      The OP asked about CGI::Pretty, silly.

      > (should have just used CGI, since the Pretty part does nothing),

      It's not my fault the new dictator of CGI::Pretty is too incompetent to maintain it and so hostile as to deliberately break it and spew obnoxious error messages instead of well-formatted HTML!

      > generating broken HTML.

      It's not broken until a browser tries to render it. You make too many false assumptions. The OP asked for incomplete HTML and may have a good reason.

      > Your mid 90s code style

      What are you talking about?

      > and crappy attitude are don't have a place in the world post 1996.

      Who put you in charge of deciding who has a place in the world? Mr. President? You pushed the wrong button, again!

        "The OP asked about CGI::Pretty, silly."

        Sure, but OP also doesn't know what they're doing and has a history of scrambling around for solutions to whatever the task of the day is, seemingly without wanting to either understand the proposed solutions or properly explain what they're end goal is...

        "It's not my fault the new dictator of CGI::Pretty is too incompetent to...

        Harsh words, have you offered to take over maintenance? Or release a fork which does all this?

        "It's not broken until a browser tries to render it. You make too many false assumptions."

        You don't know what will be parsing this, you seem to be making assumptions yourself.

        "Mr. President? You pushed the wrong button, again!"

        Let's hope not.

        Ignore everything but the technical and there's still a valid point, why even steer someone who is clearly new to this, does not really know what they're doing, down a route which is a worse path then even a basic templating system such as HTML::Template.