Show quoted text> The documentation suggests that PL makes the plural form of a noun.
The documentation actually states:
The exportable subroutine C<PL()> takes a I<singular> English noun,
pronoun, verb, or adjective and returns its plural form.
In other words, it only works if the argument is singular.
Show quoted text> But if given one which is already plural, it usually returns the singular
again:
Unfortunately, this is a (mis-)feature of English. Singular verbs inflect
like plural nouns and vice versa. So when you:
Show quoted text> say PL("countries")
the module assumes that's a verb (since singular verbs usually end
in -s in English) and so inflects it to the plural form. Of course,
"to country" is rather an esoteric verb; more regular examples would be:
say PL("comforts"); # she/he/it comforts --> they comfort
say PL("counters"); # she/he/it counters --> they counter
say PL("controls"); # she/he/it controls --> they control
# etc.
The bottom line is that all of the PL_...() subs expect a singular word
as their argument, so they won't work (as you expect) if you given them
(what you think is) a plural.
The Lingua::EN::Inflect module has many other deficiencies as well,
which is why it is now in maintenance mode only (i.e. it's deprecated),
and why I wrote the Lingua::EN::Inflexion module to replace it.
That module has a completely different interface (in the hope of
making these kinds of confusions much less likely). Using the module,
you could write:
use Lingua::EN::Inflexion;
say noun('country')->plural;
say noun('countries')->plural;
which would print:
countries
countries
as you were expecting.
Damian