Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
It might take some hours to get there due to internal CPAN handling.Physics::Udunits2 is a thin wrapper around the udunits2 package. It supports most functions of the C-API documentation. The following function groups have been left out in the current release: visitors, formatting of unit-names, and mapping of names and symbols.
A short example: use Physics::Udunits2; my $system = new Physics::Udunits2(); my $mUnit = $system->getUnit("m"); my $kmUnit = $system->getUnit("km"); if ($mUnit->isConvertibleTo($kmUnit)) { my $converter = $mUnit->getConverterTo($kmUnit); foreach my $num (1..1000) { printf("%fm = %fkm\n", $num, $converter->convert($num)); } } Feedback is welcome. Heiko
udunits
archives: