http://www.perlmonks.org?node_id=219714


in reply to Re^2: The Definitive Unit Conversion Script
in thread The Definitive Unit Conversion Script

How about putting the info from @tables into an XML format and then read it in when the module is loaded? You could also add an option to update the XML tables from an internet site, if needed.

  • Comment on Re: Re^2: The Definitive Unit Conversion Script

Replies are listed 'Best First'.
Re^4: The Definitive Unit Conversion Script
by Aristotle (Chancellor) on Dec 13, 2002 at 19:52 UTC

    Sounds like an interesting idea, but on second thought, that requires the module to be XML aware and network aware. I don't think these things belong into it; if I go there, I rather offer a clean interface for updating the @table and let the module user do the rest. Adding a sample script to the distribution that uses that interface to import an XML table might be a nice idea though.

    Update: Actually, that sounds like a very nice idea. The sample script could import currency data from somewhere. Of course, it should carry a disclaimer, since currency calculations should not be done using floating point math when actual money depends on them, but it would still be a very nifty demonstration of the module's design.

    Makeshifts last the longest.