Perl Coding Standards
August 12th, 2004
A colleague pointed out this page:
www.bbc.co.uk/guidelines/webdev/AppA.Perl_Coding_Standards.htm
This is a set of Perl coding guidelines for developers working for the BBC. Most of what's in it is straightforward good sense. One thing I hadn't come across, and hadn't considered before is flagged up by the following paragraph:
"You MUST NOT put markup language in code. CPAN provides several good templating modules, and a stripped-down version of an HTML::Template (called BBC::CGI::Template) can also be used. There should not be any situation where you need to put HTML or other markup into Perl code."
This caused me to go away and look at the HTML::Template module. I use HTML in my Perl CGI scripts all the time. Using templates seems like a much better idea and I intend to start using templates from now on.
Potentially similar posts
- Convert escaped Unicode to HTML entities – January 2012
- My first (useful) Ruby program – June 2011
- Rails Chronicles – Part 1 – June 2011
- Perl basics for beginners (on Windows) – August 2010
- Gotchas with running a Perl script as a cron job – August 2010