Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by kiat (Vicar)
on Jun 18, 2006 at 04:39 UTC ( #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
Node Status?
node history
Node Type: note [id://556051]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2014-07-29 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls