i've just uploaded the mod_parrot source:
http://www.smashing.org/mod_parrot/dist/mod_parrot-0.0.tar.gz
this initial release allows you to register a parrot content handler and
encapsulates apache's request_rec structure in a parrot object. unlike
the original version, the current mod_parrot uses NCI exclusively -- no
new PMCs or opcodes. that's really all it does right now, but in all
honesty, getting to this stage should be the hardest part.
here's an example of a simple handler:
httpd.conf:
ParrotInit /path/to/ModParrot/init.pbc
ParrotLoad /path/to/my/handler.pbc
<Location /parrot/squawk>
SetHandler parrot-code
ParrotHandler MyApp
</Location>
handler.imc:
.namespace [ 'MyApp' ]
.sub _handler
.local pmc r
load_bytecode '/path/to/lib/Apache/RequestRec.pbc'
find_type $I0, 'Apache::RequestRec'
r = new $I0
r.'puts'("You said ")
$S0 = r.'args'( )
r.'puts'($S0)
r.'puts'("\n")
.end
this is just a start, but it's already a very convincing demonstration of
how far parrot has come since the original mod_parrot.
what i'd like to see when this is done is HLLs making use of the
interfaces and classes provided by mod_parrot to implement mod_perl,
mod_python, etc. this way we can write the Apache layer once instead of
once for each language. i'm very interested in people's thoughts on this.
enjoy!
-jeff