Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: using a 'here' doc to build a web page

by Anonymous Monk
on Jun 21, 2017 at 15:59 UTC ( #1193222=note: print w/replies, xml ) Need Help??


in reply to Re^3: using a 'here' doc to build a web page
in thread using a 'here' doc to build a web page

I thought I would use CGI on the (yet-to-be-written) server program but not on the client end. The client displays a series of drop-down boxes to collect user info and I didn't think it worthwhile to go into CGI's ability to do this.
  • Comment on Re^4: using a 'here' doc to build a web page

Replies are listed 'Best First'.
Re^5: using a 'here' doc to build a web page
by kennethk (Abbot) on Jun 21, 2017 at 17:04 UTC
    While it certainly can be done, the priority here should probably be making the best value of your time. From that perspective, CGI was removed from CORE specifically because modern frameworks, such as marto's suggested Mojolicious::Lite, actually get you done faster for even simple projects than either hand-rolled or CGI-assisted web page development. A read through CGI::Alternatives is worth your time.

    That said, I have on many occasions used either a heredoc or a DATA block to hold HTML or an HTML template.


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

Re^5: using a 'here' doc to build a web page
by marto (Cardinal) on Jun 22, 2017 at 08:37 UTC

    You're right to want to avoid CGI for HTML generation, it's very clunky. If as you say this is yet to be written please consider Mojolicious::Lite rather than CGI. The learning curve is IMHO about equal, however learning the former will be more benificial to you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193222]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2021-12-09 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (36 votes). Check out past polls.

    Notices?