Bleh, that form did horrible reformatting! Sorry for the repeat, but here
it is again with the original linebreaks:
----
Not sure where to put this in the hierarchy. This is a unit-aware desktop
calculation module that attempts to figure out reasonable units to display
values in. Example output (ucalc is a thin command-line wrapper for the
module):
% ./ucalc "8KB / (8KB/(20MB/sec) + 15ms)"
532.3 byte / millisec
1.785 gigabyte / hour
42.83 gigabyte / day
519.8 kilobyte / sec
30.46 megabyte / minute
(That calculation is an 8KB random I/O throughput estimate based on
20MB/sec sequential transfers and 15ms average access time.)
This is similar to Math::Units in that it involves unit conversions
(though Math::Units is much more complete), and to Convert::Units in
making some attempt at dealing with human-readable unit descriptions
(Convert::Units goes much farther in that direction, since that is its
primary focus). Neither of them tries out different possible outputs.
Which, incidentally, was the reason why I couldn't really use either of
them as a subroutine, though I'd like to add a way to plug them in with
restricted functionality.
It doesn't make sense to me to put it under Convert::, since conversion
isn't the focus of its functionality. Math:: makes more sense, but calling
it Math::Units::Calc implies a nonexistent relationship to Math::Units,
and I'm not sure where else to put it in there. Math::Calc::Units?
Suggestions appreciated.