Here's a thread to discuss PerlHP, if anyone feels like taking my little joke seriously.
The PerlHP homepage is here: http://wakaba.c3.cx/perlhp/
It is just a little bit spartan at the moment, but the source code is there, as is the documentation. It will no doubt be developed further at some later point.
The original announcement is here: http://4-ch.net/code/kareha.pl/1105183272/33-
If you use it for anything, please tell me! And if you have any suggestions for features, feel free to request them. Remember, though, that this is meant both to be a quick hack, and to be used for quick hacks. Furhter hacks of the code is also very welcome!
PerlHP v3.01 Gold Released
That's right, the most stable and mature version of PerlHP yet! There is now beautiful error handling, and more bugfixes!
Furthermore, PerlHP now has a real homepage!
This whole thing makes me ponder whether it would be possible to port all programming languages to each other. Are they all capable of emulating enough similiarity?
Well, in theory, any Turing-complete language can emulate any other. This ignores constraints on memory, time and the ability to interface with the outside of the program, though.
Incidentially, Perl source filters, which I used for this, allow you to do arbitary transformations of the source code before it is passed to the Perl compiler, which means that you can in theory implement any language transparently on top of Perl, if you just put enough work into it. There are some interesting examples, that are funnier by far than PerlHP, such as Lingua::Romana::Perligata, http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html, and Language::Pythonesque, which has never gotten a proper release so I have nowhere to link (it adds Python-style significant whitespace to Perl).
PerlHP v5.0 Released
Now with support for Perl 5.6 through some cryptic and mysterious dark arts:
Now, I know a lot of you have been thinking, "I'd sure like to use that PerlHP, but I haven't seen any security updates for it! All good software has security updates!"
Well, fear no more, because PerlHP v5.0.1 is here! And it's a security update!
I'll have to write my website in this!
Finally, something to bridge the grace of Perl with the goo of PHP. I'm used to HTML::Embperl which is kinda nifty, but has enough quirks that I'd prefer something simple like this.
Thanks to some encouragement and help from one Michael Matthews, PerlHP SE v9.0 is now released!
The biggest, most exciting PerlHP update ever! The new features are too many to list here (because, lazy), so you will have to go read all about them on the PerlHP page!
kekeke
since someone bumped this thread, i guess i'll post these here in case anyone finds them useful...
http://hotaru.thinkindifferent.net/PerlHP_Utils.diff
http://hotaru.thinkindifferent.net/PerlHP_Comments.diff
BUMP.
Personally I would have preferred for those perl scripts to work in PHP files.
I am tired of seeing "perl only" files to software I want to download. I am a PHP programmer, not a perl programmer.
what happened to PerlHP? I am quite curious to look at the project but sadly the page doesn't work, I'm a PHP (intermediate) and Perl (beginner) programmer who is interested in the project can anyone link me to the source? thanks
>>16
http://waro.su/ uses <a href="http://hotaru.thinkindifferent.net/perlhp-mod.tar.bz2">a slightly modified version of perlhp</a>...
and there's <a href="http://web.archive.org/web/20071223223811/http://wakaba.c3.cx/perlhp/">the wayback machine</a>...
Hey!
I'd like to use PerlHP in a FCGI dispatcher script which basically looks like this:
use strict;
use warnings;
use lib "/my/perl/lib/path";
use CGI::Fast;
use Embed::Persistent;
{
my $p = Embed_Persistent->new();
while (new CGI::Fast) {
my $filename = $ENV{SCRIPT_FILENAME};
my $package = $p->valid_package_name($filename);
my $mtime;
if ($p->cached($filename, $package, \$mtime)) {
eval {$package->handler;};
}
else $p->eval_file($filename);
}
}
the script in SCRIPT_FILENAME does not need to have any hashbang in it and if I use PerlHP in it, the FastCGI dispatcher doesn't work, because of the BEGIN/END scriptlets PerlHP uses.
Now I've noticed the function perlhp in the package which should be useable in my scenario to simply evaluate a perlhp-file with nothing but "<? echo("Hello from PerlHP-FCGI"); ?>" in it, for example. But how to I actually use it?
Thanks in advance :)
Chris
By the way I don't know if you're aware of this, but apparently there is also PLP (http://search.cpan.org/~shiar/PLP/lib/PLP.pm) which is pretty similar to PerlHP. Figured it was worth a mention.