From: John H. Kelm <johnhkelm@us...> - 2005-07-19 18:18:46
Update of /cvsroot/gaim/web/htdocs/summerofcode/john/posts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7250
--- NEW FILE: 2005-07-19.txt ---
The Perl Interpreter Works, Sort Of.
After trying all the different methods I could think of to get the Perl plugin to work without crashing, I spoke with someone via IRC that gave me some ideas. Right now, the Perl plugin works and dynamically loads the perl library <code>Gaim.so</code> without crashing and without any unresolved symbol errors. To overcome the prior issues with the plugin required reloading the plugin (via <code>g_module_open</code>)from a library the plugin itself is dynamically linked to. It is kind of a hack, but it works for the most part. It took me a while to figure out how to set up the Autoconf and Automake files so that it would build properly and I think they still need some work. Furthermore, I am pretty sure it does not work under Windows.
In an attempt to try testing the Perl plugin under windows, I spent a good deal of time attempting to build Gaim on my WinXP machine to no avail. Making sure the Perl plugin works under Windows seems important so I will probably go back to it later. After getting everything set up and working I committed my changes to the CVS only to realize that I sent in a bad version of one of the files that broke Gaim on *nix. I fixed it as quickly as I could and cleaned up some things. It is much easier working on the code now that my local copy and the remote copy are synchronized. Prior to committing any of my changes and fixing the Perl plugin so it would not crash in HEAD, it was very difficult to manage my <strike>copy</strike> copies of the code.
I started writing some new test scripts to give me a break from trying to make the plugin work. I uncovered a fiendish problem: Using Perl libraries from Gaim Perl scripts causes Gaim to crash. A crashing applicaion is no good. Not being able to use packages is a big problem for the Perl plugin--it makes so many things harder. I hope to spend some time figuring out a way to correct this problem.
Originally I assumed the conversion and testing of the wrapped XSUBs would take up the majority of my time, however the XSUBs I have created seem to work. After some time figuring out how Perl works and getting familiar with the Gaim source, writing the XSUBs was not too bad. Right now a lot of time has been spent tracing down wierd bugs and perplexing error messages (or crashes). It looks like the Perl interpreter is working in Gaim again, but at a reduced capacity; with any luck I will be able to change that.