Modperlers,
I'm sort of requesting comments of folks on the best sort of syntax
for embedding perl in HTML. I'm building a mod_perl like thingee for
phhttpd and I thought while I was at it I would work on creating an
embedded perl that "should" be faster than standard perl. Sort of
like perl ssi I suppose. Here are the ideas I'm kicking arround:
You have your HTML file, and interspersed are <perl></perl> tags that
seperate perl code from standard code. But actually this is a bit
different under the covers from some other perl embedded type
languages. The idea is that it's actually interpretted as a single
perl script. All the actual static HTML is cached in memory, and the
</perl>'s act as markers of where to input the static HTML. Of course
I'm not wedded to this syntax, so if anyone has better ideas, please
pass them along.
The speed is added by there only being one single script that needs to
be "evaled" by the mod_perl like engine, not only that but the HTML is
stored in memory. The way its achieved is pretty boring c stuff, just
a linked list with the static html inside native structures for
phhttpd, and marker references that match up with the markers that are
generated by the </perl> tags.
Would anyone be interested in such a thing? My understanding is that
Mason, Embed, etc. are a bit slower than standard perl, but it seems
with a bit of tweaking these could be faster than perl in the mod_perl
engine. What do you think? It might even be possible to design the
parser so that it's not Phhttpd centric, but could be brought over to
Apache's mod_perl very easily by just re-implementing some of this
stuff as native perl structures rather than any that are native to any
particular httpd server.
Shane.
(I've just began an outline of this, its probably a couple weeks from
a version being "out there", so I'm trying to get input before I get
to wedded to a particular idea.)
I'm sort of requesting comments of folks on the best sort of syntax
for embedding perl in HTML. I'm building a mod_perl like thingee for
phhttpd and I thought while I was at it I would work on creating an
embedded perl that "should" be faster than standard perl. Sort of
like perl ssi I suppose. Here are the ideas I'm kicking arround:
You have your HTML file, and interspersed are <perl></perl> tags that
seperate perl code from standard code. But actually this is a bit
different under the covers from some other perl embedded type
languages. The idea is that it's actually interpretted as a single
perl script. All the actual static HTML is cached in memory, and the
</perl>'s act as markers of where to input the static HTML. Of course
I'm not wedded to this syntax, so if anyone has better ideas, please
pass them along.
The speed is added by there only being one single script that needs to
be "evaled" by the mod_perl like engine, not only that but the HTML is
stored in memory. The way its achieved is pretty boring c stuff, just
a linked list with the static html inside native structures for
phhttpd, and marker references that match up with the markers that are
generated by the </perl> tags.
Would anyone be interested in such a thing? My understanding is that
Mason, Embed, etc. are a bit slower than standard perl, but it seems
with a bit of tweaking these could be faster than perl in the mod_perl
engine. What do you think? It might even be possible to design the
parser so that it's not Phhttpd centric, but could be brought over to
Apache's mod_perl very easily by just re-implementing some of this
stuff as native perl structures rather than any that are native to any
particular httpd server.
Shane.
(I've just began an outline of this, its probably a couple weeks from
a version being "out there", so I'm trying to get input before I get
to wedded to a particular idea.)