Skip Menu |

This queue is for tickets about the Lingua-EN-Inflexion CPAN distribution.

Report information
The Basics
Id: 133267
Status: rejected
Priority: 0/
Queue: Lingua-EN-Inflexion

People
Owner: Nobody in particular
Requestors: ALEENA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Commas in cardinal and ordinal after threshold reached?
Could there be a way to add commas to the numbers in cardinal and ordinal after the threshold is reached? my $number = "1000"; my $threshold = "101"; my $comma = ","; my $cardinal_number = noun($number)->cardinal($threshold)->comma($comma); my $ordinal_number = noun($number)->ordinal($threshold)->comma($comma); # or my $cardinal_number = noun($number)->comma($comma)->cardinal($threshold); my $ordinal_number = noun($number)->comma($comma)->ordinal($threshold); # or my $cardinal_number = noun($number)->cardinal($threshold, $comma); my $ordinal_number = noun($number)->ordinal($threshold, $comma); Lady Aleena
Subject: Re: [rt.cpan.org #133267] Commas in cardinal and ordinal after threshold reached?
Date: Thu, 3 Sep 2020 02:59:03 +0000
To: bug-Lingua-EN-Inflexion [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> Could there be a way to add commas to the numbers in cardinal and > ordinal after the threshold is reached?
This functionality is not really appropriate for the module, as it is not actually related to English inflexion in any way. However, you can achieve the desired outcome quite easily, using the Tie::Comma module from CPAN: use Lingua::EN::Inflexion; use Tie::Comma; my $cardinal_number = $comma{ noun($number)->cardinal($threshold) }; my $ordinal_number = $comma{ noun($number)->ordinal($threshold) }; Damian