I decided Bytecode::Python would work nicely for the name, though it's a bit close to the namespace. I basically redesigned it, so it should be a little easier to code. It's almost completely OO now.
I've put in on my webserver: http://matt.diephouse.com/Bytecode-Python-0.1.tar.gz
I hope this is useful. It's not nearly where it could be, but I think it about matches Python::Bytecode for features, and I need to get some sleep before work tomorrow.
Noticeably lacking is a README, tests, a makefile, and some documentation. Not as much the documentation. Let me know if this is useable and if there's more I can do.
matt
P.S. Python/marshal.c from the python source was a great help.
Dan Sugalski wrote:
Still a bit lacking, 'specially in the documentation department, but I've got a version that sucks much less than it did, and is possibly even correct. (Go figure. Surprised me, too... :)
Anyway, if you want to fiddle, http://www.sidhe.org/~dan/Python-Bytecode-2.2.tar.gz and have at it. If an object (like a constant) has a ->disassemble method (check with can) it's code and can be disassembled.
Tests are still wrong because I messed with the bytecode and haven't fixed it. Also still Python 2.3 only, though it lies and says it does 2.2 and 2.1. Still unofficial, but hopefully I'll get this in shape to actually be useful and pass on the the patches to Simon for CPAN release.
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk