Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Clarifications in subroutines, CGI.pm, HTML::Template and performance

by kiat (Vicar)
on Jun 18, 2006 at 04:39 UTC ( [id://556051]=note: print w/replies, xml ) Need Help??


in reply to Clarifications in subroutines, CGI.pm, HTML::Template and performance

No expert here but...

I would restrict "use CGI" to common_subs.pm and let it handle all CGI related stuff. In my main script, I wouldn't expect to call "use CGI" since everything that I need for CGI parsing should already have been done via common_subs.

Without a templating system like HTML::Template, you would most likely be mixing program code with html. This can lead to ugly, bloated code and possibly maintenance problems, especially as your code grows. So it's better to make use of a templating engine such as HTML::Template to allow you to move the html out of your code. That way, the resultant code is leaner and so easier to read and maintain.

  • Comment on Re: Clarifications in subroutines, CGI.pm, HTML::Template and performance

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-24 20:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found