in reply to Re^3: div in cgi
in thread div in cgi

There is some confusion about CGI::Pretty and CGI::HTML::Functions .

At least in my head...

update

the OP is using functions which are (currently) exported by CGI and not by CGI::Pretty, but documented in CGI::HTML::Functions

X:\>perl -MCGI=:standard print li ( div({"class=inforno"}, "<img src=''>") ); __END__ <li><div class=inforno><img src=''></div></li>

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^5: div in cgi
by marto (Cardinal) on Sep 13, 2018 at 15:33 UTC

    I don't know what confusion you have on this, maybe if you explain it I can offer an opinion. From reading the docs the maintainer is working hard to patch things that are show stoppers, while firmly telling people not to use this stuff for anything new, with a bunch of good reasons why. Regardless, people keep recommending it and no doubt finding all the old posts online for getting things done in perl using CGI and friends.

      I have to dig out old documentation resp. pirated O'Reilly books to find out what CGI::Pretty used to do.

      According to the alternative code Lee is showing I'd expect that it's parsing and tidying HTML.

      According to the O'Reilly snippet it just adds newlines and indentation to CGI's HTML-Functions.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        Metacpan allows you to select old versions and view the POD, like search.cpan used to. What you mention is one of the issues I raised, a lot of old info that's highly ranked on search engines (some of it at legally questionable), vastly out of date, and still championed by a vocal minority.