- my ($str,$int) = @_;
-
- if (!defined $str) {
- &WARN("fixPlural: str == NULL.");
- return;
- }
-
- if (!defined $int or $int =~ /^\D+$/) {
- &WARN("fixPlural: int != defined or int");
- return $str;
- }
-
- if ($str eq 'has') {
- $str = 'have' if ($int > 1);
- } elsif ($str eq 'is') {
- $str = 'are' if ($int > 1);
- } elsif ($str eq 'was') {
- $str = 'were' if ($int > 1);
- } elsif ($str eq 'this') {
- $str = 'these' if ($int > 1);
- } elsif ($str =~ /y$/) {
- if ($int > 1) {
- if ($str =~ /ey$/) {
- $str .= 's'; # eg: 'money' => 'moneys'.
- } else {
- $str =~ s/y$/ies/;
- }
- }
- } else {
- $str .= 's' if ($int != 1);
+ my ( $str, $int ) = @_;
+
+ if ( !defined $str ) {
+ &WARN('fixPlural: str == NULL.');
+ return;
+ }
+
+ if ( !defined $int or $int =~ /^\D+$/ ) {
+ &WARN('fixPlural: int != defined or int');
+ return $str;
+ }
+
+ if ( $str eq 'has' ) {
+ $str = 'have' if ( $int > 1 );
+ }
+ elsif ( $str eq 'is' ) {
+ $str = 'are' if ( $int > 1 );
+ }
+ elsif ( $str eq 'was' ) {
+ $str = 'were' if ( $int > 1 );
+ }
+ elsif ( $str eq 'this' ) {
+ $str = 'these' if ( $int > 1 );
+ }
+ elsif ( $str =~ /y$/ ) {
+ if ( $int > 1 ) {
+ if ( $str =~ /ey$/ ) {
+ $str .= 's'; # eg: 'money' => 'moneys'.
+ }
+ else {
+ $str =~ s/y$/ies/;
+ }
+ }
+ }
+ else {
+ $str .= 's' if ( $int != 1 );