There's more than one way to do things | |
PerlMonks |
Re^3: Embeding Perl in HTML the PHP wayby tobyink (Canon) |
on Sep 12, 2012 at 20:08 UTC ( [id://993302]=note: print w/replies, xml ) | Need Help?? |
That's the templates though. Intermingled code and HTML are par for the course when it comes to templates. (TT2 does this just as much. Example from the documentation. It's not Perl code intermingled - it's worse; its a whole other Turing-complete language.) The files that the browsers actually hit start with <?php and don't contain a ?>, so they're PHP all the way; not HTML with little chunks of PHP. There are plenty of awful things about the design of Drupal. This is not one of them though. Update: in case anyone doubts the Turing completeness of TT2...
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|