http://www.perlmonks.org?node_id=195432


in reply to Non-threading Telnet/Mud client

I find this as a great irony, because not two weeks ago I was looking for some sort of telnet solution to write my own mud client in Perl, but I wasn't sure of how to do the sockets etc. I found a simple solution of sorts in the Perl Cookbook, but it forks, and so I've had some cross-platform issues, mainly trying some of the stuff in Windows. Sometimes it works, sometimes it doesn't.

I managed to get a basic client up and running right away, but yours seems to run a bit better than mine, at least when dealing with incomplete lines. I tried reading byte-by-byte at one point, but it did goofy stuff.

The only pieces of advice or thoughts I have about your code is documentation - I'm a big fan of using things like Pod::Usage and Getopt::Long to add things like a -h option for usage, including more documentation on things like the trigger and untrigger commands. See The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan! for more info. Also, it seems like having things a bit more organized into sections would be useful, such as grouping all config variables into one chunk of code, putting all of the subs together, etc.

I think it's a great piece of code, and I'd like to use a good deal of it to revamp my custom client (the only reason I'm not using something like tintin++ is because this Mud has all kinds of funky elements such as requiring a very specific string right at connection or I lose connection, and using a color encoding scheme that is nonstandard, so I have to use Perl to change it to ANSI)

Thanks for sharing this awesome piece of code! =)

~Brian