As I mentioned in the past few posts, I wrote a serial port monitor program in Perl. The task was to monitor several ports simultaneously and dump the results (time tagged) into a single file. The goal: debug a serial protocol between two devices.
Well, now that I'm finished, I must say that for the first time in my life, I'm dissapointed with Perl. Maybe it wasn't the right tool for this job, maybe, I don't know. Here's what disturbed me the most:
- Tk works badly with threads. A hack and a hack, no wonder hacks are needed to tie them together.
- threads are slow, terribly SSLOOOOWWWW. This is especially felt when running a pp-ed (PAR) executable.
- The Win32::SerialPort module... although not Perl's fault per se, it's a CPAN module that is the only Perl implementation for the task. Well, this module is hideous (and that's a compliment for it). It's disarranged, completely un-intuitive, doesn't implement vital features, has terrible error checking abilities. Its documentation is one of the worse I've ever seen. The author, unfortunately, is too busy to answer user questions. I had to change the module source to make error checking work in a reasonable way. All in all, it was a very discouraging experience.
- The OO implementation (a crude hack, IMHO) once again discouraged me from writing this program in a OO way. Using Perl OO modules is reasonable, but writing them is far from being fun.
End of rant
I'm eagerly waiting for Perl 6 where, hopefully, OO, threads and GUI will be tightly integrated by design.