July 2010 Archives

Using magic hash key transformation

Since version 5.10, perl has the ability to magically transform keys on a hash. This feature was added to make fieldhashes possible, but has more uses. Here I'll show you how to do in using Class::Private as an example.

Loading the XS

package Class::Private;

use 5.010;
use strict;
use warnings;
use XSLoader;

our $VERSION = '0.05';

XSLoader::load('Class::Private', $VERSION);


About Leon Timmermans