Title photo
frugal technology, simple living and guerrilla large-appliance repair
Tue, 08 Mar 2016

I learned a couple of things about Ode add-ins (and Perl in general) today

I've been having trouble with my Ode Counter add-in.

I have been using File::Find to gather filesystem information and make it available to Ode, and I learned two things.

1) The Ode add-in framework allows the passing of scalar variable data from add-in to non-post areas of the site, but it doesn't allow passing of arrays. This is easy enough to work around. You just convert the array to a scalar. There is more than one way to do this, but I chose this one:

$directory_list = join('', @directory_list_array);

2) Producing acceptable HTML out of the add-in is one thing, but for it to transfer properly to the Ode site, all the usual characters must be "escaped" on the server side:

Instead of:

<li><a href="/blog/programming/perl/">Programming > Perl</a></li>

It must be:

<li><a href=\"\/blog\/programming\/perl\/\">Programming > Perl<\/a><\/li>

Once I fix my regex, I'll be in business.