I haven't really been looking at the emu at all lately :cry: .. the whole point of the hasitem thing was to call code from the server from the perl script. That was really just an example function. I was able to get fairly far on it I think (ie: no shared library needed, but still needed module.pm file, and I never figured out how to get around that). What you have looks workable, though.
The reason I was looking at calling code back from the server was so that all of these variables wouldn't have to be declared beforehand. It seems like a lot of unnecessary overhead, for the most part.
On another note, I was just looking at bugzilla again (
http://www.bugzilla.org), and kind of wished the emu team had something more along these lines to keep track of bugs/feature requests. It may not seem necessary due to the volume of messages on the board, but I'm sure there are some good ideas being lost by the wayside.