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);

1;/users/leon_timmermans/2010/07/index.html

About Leon Timmermans

user-pic