Chris Schmidt (crschmidt) wrote,
Chris Schmidt
crschmidt

Simple Perl Server

MozEx is a program designed to let you open programs for the common takss you perform in your browser. For example, you can set your editor for your textareas to be a more conventional text editor, like vim, as opposed to the built in text editor. (Great for things like S2 editing, where you want to be able to edit the text in an editor that will give you line and column numbers, for example.) I'm fairly certain that mendel uses, or has used, this extension in the past for this explicit purpose.

It also handles URLs formatted in ways that the browser can typically not handle, and can pass them off to a command to handle them for you. An example of this is the aim: handler, which mozilla-based browsers have never handled properly on my browser. (This may be a problem unique to me because I use atypical AIM clients.) My former roomate pointed me to MozEx and mentioned that perhaps the aim client he and I both use could add functionality using the program.

Pork is a command line client based on an interface similar to EpicII IRC clients. It supports Perl scripting internally.

However, unlike other similar scripting, such as that used by irssi, the scripting can not be included as a seperate perl module. Rather, the calls are loaded when the program is loaded, so they are internal to pork. Sadly, this makes it much more difficult to execute commands in pork using a perl script.

To the best of my estimation, this means that in order to create new windows in pork, I need to have an external script (which can be called by MozEx) which then refers the command to the pork-internal script, acting as a server, which actually performs the actions.

The problem with this is simply that I have absolutely no clue how to write even a simple server to recieve this kind of information. Based on what I've seen of other simple scripts (from mendel, specifically), that using POE::Component::Server::TCP may be the best way to do it. However, I've never done anything of this sort at all, so I could be completely misunderstanding the best way to do things.

Does anyone have any suggestions or examples of simple Perl client/server combinations designed to pass limited information (in this case, just the argument to the first program)? Once I have the string inside pork, I've already figured out how I can do what I want to do, it's just getting there that's the problem.

If anyone has suggestions, I'm willing to listen. If you want to tell me that I'm on the right track, and just to keep looking, that would be cool too.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments