Randal Schwartz said it was like "training wheels without the bike" -- so why would anyone want to turn Perl into PHP? Dag Ågren explains it as a "travesty", a "joke" and something to "make Baby Jesus cry." We know it as PerlHP, and it comes pretty close to putting training wheels on the carbon-alloy LeMond racing bike of Perl. But is that a good thing?
It is if you've ever wanted to write Perl like this...
#!/usr/bin/perl use PerlHP; <html> <% echo $var; %> </html>
So what's all the fuss? Perl? PHP? It's actually a damned good templating model. Okay, the look of it still makes me shudder, but it works and it makes writing webpage based applications as intuitive as, well, as PHP.
This Jesus-offending travesty is made possible by Damian Conway's Filter::Simple module, which makes it easy to invent whatever syntax for your Perl that you prefer. And maybe that will put an end to the Language Wars for once and for all, because while it is easy to use Perl to write PHP, it is impossible to do the reverse.
We were so impressed with Dag Ågren's work we asked him if he would discuss his thoughts on Perl and PHP and cannibalism (erm...) with us. This fascinating interview will be appearing here soon!
