Perl Snippets

I keep meaning to actually finish bits of code and put them up here. My photo gallery generator gets lots of requests but I am always changing (and breaking) it, and it's rarely in a working condition.

So sometimes I write things for fun or utility. Here's a few snippets.


Mini Pod generator

Always pod your perl scripts.
addpod.pl does the basic template, and you can just fill in the details.


Regex tidier for use with HTML::Template

A search and replace inline. This one is for users of HTML::Template to change any and all occurences of

<tmpl_var name="foo"> or
<tmpl_loop>
into
<!-- tmpl_var name="foo" --> or
<!-- tmpl_loop -->

for any brain dead html editors that do not accept custom tags. It's tmplconvert.pl. It does a few general tidying things but you can decypher the regex if interested.


HTML home page

I adapted my startpage from Squarefree (er, I think) so thanks to Jesse, the king of bookmarklets. It's just static HTML and a little JavaScript, using access keys for handy shortcuts. I edit it quite often to add and remove searches.