GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Lingua::EN::Numbers::Easy(3) User Contributed Perl Documentation Lingua::EN::Numbers::Easy(3)

Lingua::EN::Numbers::Easy - Hash access to Lingua::EN::Numbers objects.

    use Lingua::EN::Numbers::Easy;

    print "$N{1} fish, $N{2} fish, blue fish, red fish";
                         # one fish, two fish, blue fish, red fish.

"Lingua::EN::Numbers" is a module that translates numbers to English words. Unfortunally, it has an object oriented interface, which makes it hard to interpolate them in strings. "Lingua::EN::Numbers::Easy" translates numbers to words using a tied hash, which can be interpolated.

By default, "Lingua::EN::Numbers::Easy" exports a hash %N to the importing package. This can be changed by giving "use Lingua::EN::Numbers::Easy" an argument - this argument is the name of the hash that will be used instead:

    use Lingua::EN::Numbers::Easy qw /%nums/;

would use %nums as the tied hash.

See also the "Lingua::EN::Numbers" man page.

"Lingua::EN::Numbers::Easy" caches results - numbers will only be translated once.

Any other operation on the exported hash than fetches will throw an exception.

This module was created at the end of the 20th century, when "Lingua::EN::Numbers" has a clunky, OO interface. Nowadays, "Lingua::EN::Numbers" has procedural interface as well, lessening the need for "Lingua::EN::Numbers::Easy".

Furthermore, "Lingua::EN::Numbers" no longer supports different British and American modes. Therefore, the support for the modes has been dropped in "Lingua::EN::Numbers" as well.

As for 2014, "Lingua::EN::Numbers" does not have an OO interface anymore, just a procedurial one. There's probably no need for "Lingua::EN::Numbers::Easy" anymore, and the reason it was created is now completely gone.

This package was written by Abigail, <mailto:lingua-en-numbers-easy@abigail.be>

This package is copyright 1999 - 2009 by Abigail.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2014-12-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.