27
Jun/09
2

Class::Measure 0.04 Released

I’ve just uploaded Class::Measure 0.04 to CPAN. Get it here. The changes for this release are optimizations and cleanups in preparation for using Moose in the next release. Class::Measure provides a simple and intuitive way to treat units of measure as basic data types with support for mathematical operations.

use Class::Measure::Length qw( length );
my $width = (length(2, 'feet') + length(3, 'yards')) * 2.8;
print 'Inches: ' . $width->inches() . "\n";

Currently the only supported units of measure are length. Sometime in the next release or two I’ll be adding support for density, frequency, volume, etc.

Tagged as: