Recently in Perl API Category

Thanks to Google translate (and the community feed) I found out about this nice little trick (original Japanese version) by Akira Sawada today.  When doing any kind of Perl development, you can run a one-line command just by calling
perl -e 'some command'
and it will be executed.  But did you know you can also (in your MT folder) do this
perl -MT -e 'some command'
and have it executed with all of Movable Type's settings and modules etc. loaded?
Even if you have dabbled in Perl scripting a bit before, writing plugins for Movable Type can seem a bit daunting at first.  Even though there is a step by step guide explaining how to create a Movable Type plugin, you still need to know quite a bit about Perl to make sense of it.  However, what many people don't know is that you can script quite a lot of actions in a Movable Type system without needing to write a full-blown plugin at all.
Did you know that 'search_by_meta' is a little known method of the MT::Object class?  Until today, I didn't, but I came accros this  hidden gem today while writing a custom Perl script for one of my Movable Type installations.  Basically I needed to pull one specific page from the database based on a value that was stored in a custom field.  It seemed easy enough, and at first I tried the standard 'load' method...