Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: inserting HTML file in a PERL script

by davidrw (Prior)
on May 29, 2005 at 19:18 UTC ( [id://461566] : note . print w/replies, xml ) Need Help??


in reply to Re: inserting HTML file in a PERL script
in thread inserting HTML file in a PERL script

actually i hadn't thought of the $10.45 case, but that's a key point. The upper/lower casing I picked was pretty much just an arbitrary definition of this quick & dirty template system. My rationale was all upper for the template vars so that they stand out more in the template. And all lowercase for the keys since variable/key names are typically lowercase. Also, lc'ing it makes it tolerant of typos like $FIRSt_NAME in the template.

As for what to do with unknown vars, i figured that leaving '$FOO' in there was better to make it obvious that it didn't match, whereas doing '' might not be noticed..

But both ways are up to the template authoer on how they prefer it to work..