Programming

SMF 2.0 on PHP 7.2

I recently changed my server from CentOS 6 to CentOS 7 and in the process decided that to avoid having to upgrade everything later, installing PHP 7.2 before migrating the sites would be a better option than staying with the default PHP 5.4. This was a good idea - mostly. It …

Installing DBD::mysql on Mavericks

3 years ago, I posted about getting DBD::mysql to build on OSX 10.6 - it seems the same thing works on Mavericks (10.9) as well! # Failed test 'use DBD::mysql;' # at t/00base.t line 18. # Tried to use 'DBD::mysql'. # Error: Can't load …

cpan2rpm for CentOS 6.5

I’ve been attempting to build all the dependencies for Dancer on CentOS 6.5 and things just kept going wrong. Several of the modules complained about needing perl >= 5.006 even though CentOS 6.5 comes with Perl 5.10. [mockbuild@build6 ~]$ cpan2rpm Test::Simple -- …

DBIx::Class default column value

Having read the docs for DBIx::Class::Row new() and DBIx::Class::ResultSource add_columns() it’s hard to know whether it’s better to (a) override new() for the Result module and set a default value in the method params, or (b) use default_value in the add_columns …

DBD::mysql, MySQL and OS X Lion

I downloaded and installed MySQL Community Server 5.5.15 from http://dev.mysql.com/downloads/mysql/5.5.html Using CPAN, I then tried to install DBD::mysql on a fresh install of OS X Lion and was presented with an error saying it was unable to load the library. # Error: …

Shartak internals - speech and translation

Within Shartak there are two main factions - natives and outsiders. To make things somewhat realistic (and interesting), when they first start off there is quite a hefty language barrier in that a native can’t really understand an outsider and vice-versa. This situation can …

Shartak internals - Maps and movement

The map for Shartak is held in a database table with over 140,000 rows in it. Each row corresponds to a single location on the map, also called a tile. The initial island map was generated automatically based on a simple bitmap image with varying colours for the different …

IPv6 and Shartak

Over the last couple of weeks I’ve been trying to figure out IPv6. Having worked through some of the IPv6 certification at http://ipv6.he.net/ I now have an IPv6 enabled web server and mail server as well as IPv6 connectivity at home via tunnelbroker.net I thought I’d …

Merging two hashrefs in Perl

I came across an interesting and very simple way to merge the contents of two hashrefs today. A hash is made up of pairs - a key and a corresponding value. As an example, the following can be pasted into a shell session on most machines that have perl installed. perl …