BBC Open Source
Posted by Neil Crosby on July 16, 2005 11:33 PM
A couple of days ago, as reported by plasticbag.org, the BBC opened up a new Open Source section to its website. To be honest, there isn’t a lot up there that interests me right now, but the fact that the Beeb is promoting Open Source software like this is surely A Good Thing.
There is, however, one piece of software which has been released that seems like it might be useful to a few of the visitors to this website - the mod_ssi_func apache suite. This suite supports the standard Apache mod_include suite, adding quite a bit of extra functionality that looks like it should be able to be used pretty easily by existing mod_include users. The suite essentially seems to let you run precompiled functions as includes on your webpages. Here’s a simple example of the suite in action:
<!--#func var="sum" func="add" value="2" value="4" -->
<!--#func var="cond" func="cmp" a="${sum}" op="eq" b="4" -->
<!--#echo var="cond" -->
This example first adds together the values 2
and 4
, assigning them to a variable called sum
. This sum
is then compared with the value 4
, and the result of the comparison placed in a variable called cond
. This variable is then printed to the screen using the #echo
command. Since 2 + 4 does not equal 4, 0 is printed. Simple. (N.B. I’m guessing that the documentation is incorrect where it says that 2 + 4 = 4).
As with everything else on the BBC Open Source site, the mod_ss_func suite is software which has already been tried, tested and tidied up by the BBC - so it should be fairly stable. After all, if it’s stable enough to be used by the mighty bbc.co.uk website, it should be stable enough for you!