New itexToMML Plugins for MovableType and ecto
For several hours, this evening, the previous entry was truncated, mangled, ill-formed poo. Both the itexToMML plugin for MovableType, and the corresponding plugins for ecto were misbehaving.
They were both written to use Perl’s bidirectional pipes (IPC::Open2) to filter the posts through itex2MML.
This works well, as long as the data does not exceed some critical size. However, at least on MacOSX, with longer data the process just hangs, waiting to read back the filtered output.my $pid = open2(*Reader,*Writer, "itex2MML -"); print Writer $_"; close Writer; my @out = <Reader>; waitpid $pid, 0; my $html = join('',@out);
For some reason, none of my hundreds of previous posts ever triggered this bug. Nor, indeed, had the, slightly shorter, original version of that post. Urs had reported problems with some of his posts, but I could never track down the problem. But here was a real-live instance, where merely adding a paragraph of text caused both ecto and MovableType to act up.
So, there I was, tearing my hair out in frustration, until I finally decided to rewrite these plugins to use temporary files instead of bidirectional pipes. Maybe a little less elegant and efficient, but a lot more stable.
If you use ecto as a blogging tool, you definitely want the new version of the itexToMML text filter plugins. If you are running MovableType on MacOSX (and possibly other operating systems), you may want the new version of the MovableType plugin as well.
Posted by distler at September 2, 2005 1:17 AM
Re: New itexToMML Plugins for MovableType and ecto
Great. Thanks for fixing this!
I think I know how you felt. ;-)