## October 5, 2003

### Perl 5.8.1 and MovableType

You may have noticed the mess on this blog on Thursday/Friday. It was caused by my upgrading the Perl installation to 5.8.1 (from 5.8.0).

Perl 5.8.1 has an unfortunate interaction with the way MovableType applies global filters. MT stores the global filters in a Hash . With Perl 5.8.0 and earlier, the order in which they would get executed was, if not predictable, at least consistent between invocations. Not so with 5.8.1. Now the order of execution is truly random, differing from invocation to invocation.

Consider an MT container tag

<MTEntryBody process_tags="1" safe_urls="1">

with content

... <a href="<MTBlogURL>archives/000121.html"> ...

Sometimes the process_tags filter will get executed first (expanding the MT tag into a full URL), but sometimes the safe_urls filter will be applied first, yielding

... <a href="&lt;MTBlogURL&gt;archives/000121.html"> ...

The only solution is to enforce the execution-order using Alexei Kosut’s MTBlock plugin:

<MTBlock safe_urls="1"><MTEntryBody process_tags="1"></MTBlock>

Anyway, between that and the inevitable pain associated to switching from Apple’s “let’s throw everything helter-skelter into /Library/Perl” to a more standard perl setup, with separate directories for standard and site-specific modules, organized into subdirectories by version-number, things were pretty rocky here for a while.

Should all be back to normal now…

Posted by distler at October 5, 2003 2:10 PM

TrackBack URL for this Entry:   http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/231