PerlScript Plugin

<MTPerlScript> is tag for Movable Type templates. If you know how to write Perl code, this custom tag gives you remarkable flexibility in producing pages from Movable Type. You can literally do any kind of manipulation you can think of using your Movable Type data.

This tag was written with a 'trust-the-programmer' mentality (or in this case, the template writer). There aren't any restrictions placed on the code executed from this tag.

Availability

You can download this plugin here: mtperlscript-1_4.zip

Installation

There are 2 files that have to be installed with this plugin: perlscript.pm and perlscript.pl. The "pl" file is the one you put in the Movable Type 'plugins' subdirectory. The 'pm' file contains the majority of the code and needs to be installed in a 'bradchoate' directory underneat the Movable Type 'extlib' directory. Here's how your installation should look:

  • (mt home)/plugins/perlscript.pl
  • (mt home)/extlib/bradchoate/perlscript.pm
You can also refer to the Movable Type documentation for more information regarding plugins.

<MTPerlScript>

Attributes

  • package: Allows you to identify the Perl package namespace for this Perl code.
  • cache: If given, the code within the tag is cached which speeds up it's operation if run from within a 'looping' tag such as MTEntries. However, if you use MT tags inside <MTPerlScript>, they will only be evaluated once.
  • once: If given, the code in the tag is evaluated only once. This is based on the package name, so you can only have 1 PerlScript block per package that uses this attribute. This is especially necessary for PerlScript blocks that define functions and are processed multiple times in a single build.
  • reprocess: If set to '0', it will prevent any MT tags printed by the PerlScript code from being evaluated (default is '1').
  • preprocess: If set to '0', it will prevent any MT tags contained within the PerlScript block from being evaluated (default is '1').

Additionally, use can pass any number of attributes and process them using the '%args' hash described below.

Here are some convenient variables that you can access within your script:

  • %args: hash containing the arguments passed to the PerlScript tag.
  • %stash: Current Movable Type 'stash' containing the context variables from parent tags.
  • $dbh: A handle to your Movable Type database (if you're using a database for storing your data).

Here's a simple example:

<MTPerlScript multiplier="3">
  $a = 5;
  print $a * $args{multiplier};
</MTPerlScript>

The above will print 15 in your web page. Now, what's the point of that? Well, it's just an example. There's really no limit to what can be done with Perl code.

You should also know that before the Perl code is processed, any Movable Type tags contained within are processed prior to the Perl code being evaluated. For example:

<MTPerlScript>
  print uc("<MTBlogName>");
</MTPerlScript>

This will uppercase your blog's name and return it.

Additionally, once the Perl block has been processed, the output from it will be scanned for Movable Type tags. If any exist, they too will be processed before returning the output. For example:

<MTPerlScript>
  print "<M"."TBlogName>";
</MTPerlScript>

The above code will output your blog's name. Because the "MT" tag is broken up that way, it is processed after the Perl code has been evaluated.

So how about a somewhat more useful example?

<MTPerlScript>
  print localtime();
</MTPerlScript>

This will produce the current time (based on your server's clock).

Or how about (assuming you're using MySQL for storing your blogs):

<MTPerlScript>
  ($count) = $dbh->selectrow_array('select count(*)
    from mt_entry');
  print "entry count: $count";
</MTPerlScript>

Or define some routines you can use over and over:

<MTPerlScript package="mylib" once="1">
  sub hello {
    print "Hello, world!";
  }
</MTPerlScript>

<MTPerlScript>
  mylib::hello();
</MTPerlScript>

Please note: Be very careful who you give access to edit your templates if you have this plugin installed. Anyone who can edit templates on your server can basically control your web site with this plugin under the hood. The Perl code contained within your PerlScript tags is not sandboxed at all: file and database operations can be performed, infinite loops can tie up your server-- any number of things can go wrong. I cannot be held responsible for any damage to your web site or web server due to the improper use of this plugin.

For More Information

License

Released under the MIT License.

Changelog

  • 1.4: Added 'reprocess' and 'preprocess' attributes to PerlScript tag.
  • 1.3: Added interface code for the Macros plugin-- sold separately :).
  • 1.2: MT tags produced by PerlScript will now be processed as advertised.
  • 1.1: Added the 'once' attribute.
  • 1.0: Initial release

TrackBack

TrackBack URL for this entry:
http://bradchoate.com/mt/feedback/tb/236

Listed below are links to weblogs that reference PerlScript Plugin:

» perlscript from BlogBlog
PerlScript Plugin [Read More]

» Perl Directly In MT Templates from Light From An Empty Fridge
[brad choate dot com] PerlScript Plugin This is potentially very cool. Basically it allows you to execute Perl code inside [Read More]

» this is stolen from the blivit
so here's a few more things fun and informative facts about the redesign… i finally figured out how to [Read More]

» MT colophon from markpasc.org
Makali has ruminated on Movable Type, and I'm about to be able to switch my Radio readers over here, so [Read More]

» For the record: Weblog Timeline in SVG from Syntactic Saccharose
Everytime someone in blogdom comes up with something new (FOAF, RSS link tag, blogchalking...) I wonder why I hadn't thought of it before, for most times they are great, simple ideas. Sometimes (like in CSS styling RSS feeds) I think to myself: well, I... [Read More]

» For the record: Weblog Timeline in SVG from Syntactic Saccharose
Everytime someone in blogdom comes up with something new (FOAF, RSS link tag, blogchalking...) I wonder why I hadn't thought of it before, for most times they are great, simple ideas. Sometimes (like in CSS styling RSS feeds) I think to myself: well, I... [Read More]

» More Plugin Fun from Digital Daydreaming
I'm discovering that these Movable Type plugins can be addictive. I'm now using BlogTimes from Nilesh Chaudhari and MTPerlScript from [Read More]

» More Plugin Fun from Digital Daydreaming
I'm discovering that these Movable Type plugins can be addictive. I'm now using BlogTimes from Nilesh Chaudhari and MTPerlScript from [Read More]

» More Plugin Fun from Digital Daydreaming
I'm discovering that these Movable Type plugins can be addictive. I'm now using BlogTimes from Nilesh Chaudhari and MTPerlScript from [Read More]

» More Plugin Fun from Digital Daydreaming
I'm discovering that these Movable Type plugins can be addictive. I'm now using BlogTimes from Nilesh Chaudhari and MTPerlScript from [Read More]

» More Plugin Fun from Digital Daydreaming
I'm discovering that these Movable Type plugins can be addictive. I'm now using BlogTimes from Nilesh Chaudhari and MTPerlScript from [Read More]

» For the record: Weblog Timeline in SVG from Syntactic Saccharose
Everytime someone in blogdom comes up with something new (FOAF, RSS link tag, blogchalking...) I wonder why I hadn't thought of it before, for most times they are great, simple ideas. Sometimes (like in CSS styling RSS feeds) I think to myself: well, I... [Read More]

» For the record: Weblog Timeline in SVG from Syntactic Saccharose
Everytime someone in blogdom comes up with something new (FOAF, RSS link tag, blogchalking...) I wonder why I hadn't thought of it before, for most times they are great, simple ideas. Sometimes (like in CSS styling RSS feeds) I think to myself: well, I... [Read More]

» For the record: Weblog Timeline in SVG from Syntactic Saccharose
Everytime someone in blogdom comes up with something new (FOAF, RSS link tag, blogchalking...) I wonder why I hadn't thought of it before, for most times they are great, simple ideas. Sometimes (like in CSS styling RSS feeds) I think to myself: well, I... [Read More]

» Perl plug-in for MT from Dale Pike
Source: MT Perl Plug-in I can imagine Jason salivating over this one... [Read More]

» Trackback is Go from From the Orient
Aquarion seems to be running a parallel implementation process to what I am doing. The difference is that Aquarion is [Read More]

» Macro Magic from John's Jottings
I have my Book Review markup macro working the way I want it to now. Or at least pretty close. [Read More]

» MT-plugins from Caboose
I've started using a couple of Brad Choate's plugins for Movable Type, the system that maintains this bit of the [Read More]

» MT-plugins from Caboose
I've started using a couple of Brad Choate's plugins for Movable Type, the system that maintains this bit of the [Read More]

» MTRandomOTDEntry from markpasc.org
A Movable Type plugin for displaying a random entry that appeared on the same day in other years. [Read More]

» MTRandomOTDEntry from markpasc.org
A Movable Type plugin for displaying a random entry that appeared on the same day in other years. [Read More]

» MTRandomOTDEntry from markpasc.org
A Movable Type plugin for displaying a random entry that appeared on the same day in other years. [Read More]

» MTMacros correctamente from blog-e-ando
Dado que tenis inters en emplearlas, un apequea explicacin de cmo hacerlo: Descargamos el plugin MTMacros - del cul disponeis de informacin traducida al castellano sobre cmo instalarlo: MTMacros en Castellano Descargamos tambin el plugin MTPer... [Read More]

» MTMacros correctamente from blog-e-ando
Dado que tenis inters en emplearlas, una pequea explicacin de cmo hacerlo: Descargamos el plugin MTMacros - del cul disponeis de informacin traducida al castellano sobre cmo instalarlo: MTMacros en Castellano Descargamos tambin el plugin MTPer... [Read More]

» Perl in MT from Dale Pike
Brad Choate: PerlScript Plugin "<MTPerlScript> is tag for Movable Type templates. If you know how to write Perl code, this custom tag gives you remarkable flexibility in producing pages from Movable Type. You can literally do any kind of manipula... [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» Perlscript and Yearly Calendars from Simplicity and Chaos
I've just installed Brad Choate's Perlscript plugin. It enables you to use the Perl scripting language within your templates. I don't know Perl, but Brad's come up with some great plugins and tips that use it, so I've installed it. [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them [Read More]

» Movable Type PerlScript plugin from Tribblescape Info
http://www.bradchoate.com/past/mtperlscript.php... [Read More]

» PerlScript Plugin from Robert Brook
Brad Choate: PerlScript Plugin print localtime();... [Read More]

» Auto-acronym from yowkee essential
While busy on adding this little and that little tricks on MT template, it might be good to blog on them too. Acronym is apparently a good way to save typing and release your reader of scratching head in figuring... [Read More]

» MTPerlScript from chris.gushue.net
Thanks to teferi, I have MTPerlScript set up here, so I can easily update the Links and Weblogs parts of the sidebar without having to edit the template. It only seems to update the links on a rebuild, but that's still better than it was before. I'm su... [Read More]

» Almost there from Escapism
Installed Brad Choate's MT-Perlscript and MTMacro plugins via Mark Pilgrim. And I must say, they are really neat. The possibilities are endless! More stuff to get into and not finish. Almost done with most of the site. Just need to... [Read More]

» MTPlural from Waffle
So, I finally decided to do it. MTPlural v0.1 <MTPlural> in short finally makes a MT-only (passing over on MTPerlScript... [Read More]

» MT, Time Zones, DST, and RSS from PapaScott
I'm planning to archive my quick links as RSS files and use the Magpie or Onyx PHP libraries to add them to my montly archives. While preparing the files, I... [Read More]

» Converting entry dates to UTC in Movable Type with the PerlScript plugin from scriptygoddess.com
I was recently frustrated by Movable Type's basic support of time zones. You can select a time zone as a [Read More]

» MT Plugins Installed from Technology Updates
The following MovableType plugins were installed: From Brad Choate IncludeEx - Improves on MT’s Include tag by processing the included file for MT tags. MTAuthors - This plugin allows you to list the authors for your blog. You can also... [Read More]

» (N)Echo Template for MovableType from magpiebrain
Before I started working on the aforementioned template for (N)Echo 0.1, I thought I'd better check to see if anyone else has done it. Sure enough I came across a template by Dan Dickinson. His template requires the use of... [Read More]

» RSS Fixups from weblog.antbear.org
So, dies ist der vorläufig letze technische Eintrag für heute (es soll ja Menschen geben, die sich darüber beschwehren). Mein RSS-Feed wird von Carmina wider aktzeptiert und zwar mit Status 1. Zum Problem: Carmina akzeptierte meine defau... [Read More]

» Essential Plugins For MT from zlog - posts
Topic for today, Movable Type plugins. Installation of the following will result in a better MT experience: MTIfEmpty -- Brad Choate MTMacros -- Brad Choate MTSafeHref -- Gavin MTPerlScript -- Brad Choate MTPlural -- Jesper Lindholms SimpleComments -- ... [Read More]

» RSS Fixups from weblog.antbear.org
So, dies ist der vorläufig letze technische Eintrag für heute (es soll ja Menschen geben, die sich darüber beschwehren). Mein RSS-Feed wird von Carmina wider akzeptiert: Status 1. Zum Problem: Carmina akzeptierte meinen default-MT RSS-Fe... [Read More]

» Updated n-Echo Prototype from Dan Dickinson: The Primary Vivid Weblog
The template requires two MT plugins to be installed, LastModified and MTPerlScript. LastModified is needed since MT doesn't let you extract the date an entry was last modified, and MTPerlScript is needed for time conversions to UTC, which is the prefe... [Read More]

» MT Plugins from Life. Love. Faith.
Wanted to give some shoutouts to the kickin' MovableType plugins that are making the new design of the site rock... [Read More]

» For the record: Weblog Timeline in SVG from Syntactic Saccharose
Everytime someone in blogdom comes up with something new (FOAF, RSS link tag, blogchalking...) I wonder why I hadn't thought of it before, for most times they are great, simple ideas. Sometimes (like in CSS styling RSS feeds) I think to myself: well, I... [Read More]

» Look Mom! from Rizwan Kassim's Public Log
See what I’ve done? The side bars (just left for now) are collapsable, and not in the stupid way that the blogrolling is collapsable… It actually doesn’t transmit the data if it doesn’t need to, meaning an even quicker download... [Read More]

» Look Mom! from Rizwan Kassim's Public Log
See what I’ve done? The side bars (just left for now) are collapsable, and not in the stupid way that the blogrolling is collapsable… It actually doesn’t transmit the data if it doesn’t need to, meaning an even quicker download... [Read More]

» Reviews are up and running! from Station in the Metro
0201726831With loads of inspiration and help from:John C.'s Macro Magic review macro (used as a starting point),Brad Choate's MTPerlScript and MTMacro plugins,MTAmazon from Kalsey Consulting Group, andinvaluable installation help for expat from David W... [Read More]

» MT-Macro goodness from Bryan Helmkamp's Weblog
Thanks to a wonderfully useful tip from Mark, posts I make to this blog are automatically displayed with the proper acronym tags inserted. The hack relies on the MT-Macro and PerlScript plugins from Brad Choate. This should lead to an... [Read More]

» Redesign Nightmare from Whats Crackin
Still attempting to redesign and I have quite a few errors yet. I did get a Year Archives with MT to work using the PerlScript plugin. Thank you girlie for the tip! Hopefully tomorrow I can finish up the redesign... [Read More]

» Friday Feast #64: Abbreviations, Acronyms, and Shortened Words from Brainstorms and Raves
I've noticed that a growing number of websites are providing tooltips and styles for abbreviations and acronyms within content. Later versions of browsers support the and , with the exception of Internet Explorer unfortunately not recog... [Read More]

» It's late...or early if you're a rooster. from put off 'til today
Site tweaks, redesigns, and new plugins fill an hour or so while I'm not able to sleep. [Read More]

» It's late...or early if you're a rooster. from put off 'til today
Site tweaks, redesigns, and new plugins fill an hour or so while I'm not able to sleep. [Read More]

» It's late...or early if you're a rooster. from put off 'til today
Site tweaks, redesigns, and new plugins fill an hour or so while I'm not able to sleep. [Read More]

» MT Macros & Acronyms from ManiacalRage
A few people have asked me how I do the acronyms on this site. You know, the words that have the grey dotted underline and when you mouse over them... [Read More]

» TechnoratiTags from 90% Crud
Technorati announced their new tag search engine recently (more info on that), so I've written a Movable Type plugin that will take an entry's Keywords field and turn them into Technorati tags. If you want to see it in action,... [Read More]

» Movabletype and Technorati Tags from Yezbick.com: If It's Weird, Flip It Over and Check - It Might Be a Yezbick
Finally got my tags working. For weeks I've had George's plugin placed inside the posted div underneath the entry body. For weeks my pings haven't been reaching technorati. Tonight, after browsing through my newsreader (Sage), I noticed that peripathet... [Read More]

» Movabletype and Technorati Tags from Yezbick.com: If It's Weird, Flip It Over and Check - It Might Be a Yezbick
Finally got my tags working. For weeks I've had George's plugin placed inside the posted div underneath the entry body. For weeks my pings haven't been reaching technorati. Tonight, after browsing through my newsreader (Sage), I noticed that peripathet... [Read More]

» Movabletype and Technorati Tags from Yezbick.com: If It's Weird, Flip It Over and Check - It Might Be a Yezbick
Finally got my tags working. For weeks I've had George's plugin placed inside the posted div underneath the entry body. For weeks my pings haven't been reaching technorati. Tonight, after browsing through my newsreader (Sage), I noticed that peripathet... [Read More]

» Movabletype and Technorati Tags from Yezbick.com: If It's Weird, Flip It Over and Check - It Might Be a Yezbick
Finally got my tags working. For weeks I've had George's plugin placed inside the posted div underneath the entry body. For weeks my pings haven't been reaching technorati. Tonight, after browsing through my newsreader (Sage), I noticed that peripathet... [Read More]

» PerlScript ץ饰 from ϥϡʲ
Brad Choate: PerlScript Plugin nlog(n): ... [Read More]

» PerlScript ץ饰 from ϥϡʲ
Brad Choate: PerlScript Plugin nlog(n): ... [Read More]

» Web Hosting & MT Hacking from BrockLi
Live and learn, right? Well, I've learned a few things about web hosting. GoDaddy sucks, straight up. I don't like their admin pages, the server was slow, and half the things I wanted in MT didn't work (TypeKey and e-mailing... [Read More]

» Tagging tus notas from WR276
Implementacin de etiquetas Technorati. [Read More]

» Tagging tus notas from WR276
Implementacin de etiquetas Technorati. [Read More]

» Wait, Back Up from BrockLi
I don't why it didn't work last time, but a second attempt with CatEntries has turned out better than the first. I got tired of entries in the Reading and Recently Viewed categories appearing on the main page, when really,... [Read More]

» Wait, Back Up from BrockLi
I don't why it didn't work last time, but a second attempt with CatEntries has turned out better than the first. I got tired of entries in the Reading and Recently Viewed categories appearing on the main page, when really,... [Read More]

» Wait, Back Up from BrockLi
I don't why it didn't work last time, but a second attempt with CatEntries has turned out better than the first. I got tired of entries in the Reading and Recently Viewed categories appearing on the main page, when really,... [Read More]

» Randomizing revisited from Krijnen.com
Exploring all possibilities in MovableType is kind of a neverending trip. Another good help is The Movable Type 3 Bible by Rogers Cadenhead, that's lying next to my machine these days. And of course there's always the daily trip tot... [Read More]

» Randomizing revisited from Krijnen.com
Exploring all possibilities in MovableType is kind of a neverending trip. Another good help is The Movable Type 3 Bible by Rogers Cadenhead, that's lying next to my machine these days. And of course there's always the daily trip tot... [Read More]

» XML-RPC & forms from Movalog
When I set about re-creating MovaDir, I wanted to create a form that would post directly into MT. I soon discovered that I would need to use the XML-RPC API to really streamline it. This is a tutorial that will... [Read More]

» XML-RPC & forms from Movalog
When I set about re-creating MovaDir, I wanted to create a form that would post directly into MT. I soon discovered that I would need to use the XML-RPC API to really streamline it. This is a tutorial that will... [Read More]

» Navigation, Tags and Indexes Solved! from MultiMediaStory.com
It's done, folks! Now we have a subject index, an article index, a search function which will also return relevant other keywords that you can browse, a list of related keywords you can follow to other related multimediastory.com posts AND those same k... [Read More]

» Look Ma, No Tags from Pretentious
Actually, its yes tags. I've been smitten with Flickr's tag layout scheme since I first saw it and have always wanted to implement a tag system here. Its a fantastic method of arranging and representing the content - and what... [Read More]

» ライブドアBlogからMT3.3へ移管する時のカレンダー問題 from グラフィックデザイン | デザイン事務所(大阪)アドアチーブ株式会社のオフィシャルBLOG
今日は第二弾。カレンダーです。 デフォルトでMT3.3はLDのような月めくりカレ... [Read More]

8 Comments

Quadsk8 said:

Brad,

I'm interested using this plugin with the year_view script.

After I chmod the files I am not able to loginto mt.cgi anymore with a 500 Error.

When I remove the plugins it's ok again.

My ISP uses Apache with SuExec wrapper, could this be conflicting with your PerlScript plugin?

Jay said:

Hey Brad, in Version 1.2, the header file of perlscript.pl says Version 1.0. Much confusion ensues. :-)

Jay said:

Hey Brad, in Version 1.2, the header file of perlscript.pl says Version 1.0. Much confusion ensues. :-)

John Gruber said:

Me, on using MTPerlScript to generate "smart quotes" on the fly:
http://daringfireball.net/2002/08/movable_type_smart_quote_devilry.html

tajuddin said:

Hi

Thanks for the Plugin which allows to insert Perl code in the Movable Type Template.

I have a problem ....

My Boss has the Habit of writing posts and saving it as Draft so I have written a script which converts that day drafts to publish and rebuilds ths whole blog.

Bu the Perl code does not get interpreted once i run Draft2publish , the code gets higlighted in every entry.

Can u let me know when I am going wrong.

Thanks and Regards

Tajuddin.

Alex said:

Extremely cool. Now I can use Perl instead of PHP in my templates. But now that the whole encapsulated code idea is in my head, I have to ask: is there a way to embed Perl/PHP code directly into the entries, so they are executed when the page is rebuilt? It seems like entering a MTPerlscript element directly in the entry body should work, but it doesn't :(

Great work. Thanks

Ole said:

Brad, absolutely great. Of all your wonderful plugins I like this one best -- and, since I'm not a Perl guru, appreciate your great tips on the MovableType support forum. Thanks.

Ragnar said:

Hi,

I have a question regarding the MT-Perlscript.
I installed it successfully and use it to add google-search results to the mt-search results template - see here!

But all special characters get messed up as you can see if you look at this webpage when I look for the word "brot".

Any thoughts or suggestions on that? :o)

About

This article was published on July 27, 2002 4:46 PM.

The article previously posted was MT-RefSearch.

The next article is Key Values Plugin.

Many more can be found on the home page or by looking through the archives.

Powered by Movable Type