There is a lot of fuss in the press at present about the current terrorist threat to the UK.
The government has put the current threat level on a few of it’s websites. These are…
The US government has had provided it’s threat levels to the public for a while, and there are various ways to access this, incuding a Perl module called Acme::Terror.
Now the UK has this information online, I decided to provide the UK with it’s own version of this Perl module, which I’ve rather originally decided to call Acme::Terror::UK.
It’s really simple to use the module. For example, this small bit of code will fetch and display the current UK threat level.
use Acme::Terror::UK;
my $t = Acme::Terror::UK->new(); # create new Acme::Terror::UK object
my $level = $t->fetch; # fetch the current terror level
print "Current terror alert level is: $leveln";
The code goes off to the home office site behind the scenes and screen scrapes the page to get the current UK threat level as the UK government doesn’t currently provide and automated feed of this information. This makes the module vulnerable to any design changes on the page, but it works for now and that’s the main thing.
There are 5 levels, these are…
- CRITICAL – an attack is expected imminently
- SEVERE – an attack is likely
- SUBSTANTIAL – an attack is a strong possibility
- MODERATE – an attack is possible but not likely
- LOW – an attack is unlikely
At the time of writing, Acme::Terror::UK informs me the current threat level is SEVERE.