r66634 - in /branches/upstream/liblingua-en-inflect-perl/current: Build.PL Build.pl Changes MANIFEST META.yml README lib/Lingua/EN/Inflect.pm t/inflections.t t/wordlist.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Dec 30 00:55:11 UTC 2010


Author: jawnsy-guest
Date: Thu Dec 30 00:55:06 2010
New Revision: 66634

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=66634
Log:
[svn-upgrade] new version liblingua-en-inflect-perl (1.893)

Added:
    branches/upstream/liblingua-en-inflect-perl/current/Build.PL
Removed:
    branches/upstream/liblingua-en-inflect-perl/current/Build.pl
Modified:
    branches/upstream/liblingua-en-inflect-perl/current/Changes
    branches/upstream/liblingua-en-inflect-perl/current/MANIFEST
    branches/upstream/liblingua-en-inflect-perl/current/META.yml
    branches/upstream/liblingua-en-inflect-perl/current/README
    branches/upstream/liblingua-en-inflect-perl/current/lib/Lingua/EN/Inflect.pm
    branches/upstream/liblingua-en-inflect-perl/current/t/inflections.t
    branches/upstream/liblingua-en-inflect-perl/current/t/wordlist.t

Added: branches/upstream/liblingua-en-inflect-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/Build.PL?rev=66634&op=file
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/Build.PL (added)
+++ branches/upstream/liblingua-en-inflect-perl/current/Build.PL Thu Dec 30 00:55:06 2010
@@ -1,0 +1,17 @@
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+    module_name         => 'Lingua::EN::Inflect',
+    license             => 'perl',
+    dist_author         => 'Damian Conway <DCONWAY at CPAN.org>',
+    dist_version_from   => 'lib/Lingua/EN/Inflect.pm',
+    requires => {
+        'Test::More' => 0,
+        'version'    => 0,
+    },
+    add_to_cleanup      => [ 'Lingua-EN-Inflect-*' ],
+);
+
+$builder->create_build_script();

Modified: branches/upstream/liblingua-en-inflect-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/Changes?rev=66634&op=diff
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/Changes (original)
+++ branches/upstream/liblingua-en-inflect-perl/current/Changes Thu Dec 30 00:55:06 2010
@@ -187,3 +187,8 @@
       'is/am/are/was/were/have/had/alibi/hoe' (thanks Paul)
 
     - Fixed pluralization of verb "quizzes" (thanks Paul)
+
+
+1.893  Thu Nov  4 06:24:06 2010
+
+    - Fixed major glitch in WORDLIST (thanks calimo)

Modified: branches/upstream/liblingua-en-inflect-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/MANIFEST?rev=66634&op=diff
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/MANIFEST (original)
+++ branches/upstream/liblingua-en-inflect-perl/current/MANIFEST Thu Dec 30 00:55:06 2010
@@ -1,6 +1,6 @@
 Changes
 MANIFEST
-Build.pl
+Build.PL
 Makefile.PL
 README
 demo/demo_NO.pl

Modified: branches/upstream/liblingua-en-inflect-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/META.yml?rev=66634&op=diff
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/META.yml (original)
+++ branches/upstream/liblingua-en-inflect-perl/current/META.yml Thu Dec 30 00:55:06 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Lingua-EN-Inflect
-version:             1.892
+version:             1.893
 abstract:            Convert singular to plural. Select "a" or "an".
 license:             ~
 author:              

Modified: branches/upstream/liblingua-en-inflect-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/README?rev=66634&op=diff
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/README (original)
+++ branches/upstream/liblingua-en-inflect-perl/current/README Thu Dec 30 00:55:06 2010
@@ -1,4 +1,4 @@
-Lingua::EN::Inflect version 1.892
+Lingua::EN::Inflect version 1.893
 
 The exportable subroutines of Lingua::EN::Inflect provide plural
 inflections and "a"/"an" selection for English words.

Modified: branches/upstream/liblingua-en-inflect-perl/current/lib/Lingua/EN/Inflect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/lib/Lingua/EN/Inflect.pm?rev=66634&op=diff
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/lib/Lingua/EN/Inflect.pm (original)
+++ branches/upstream/liblingua-en-inflect-perl/current/lib/Lingua/EN/Inflect.pm Thu Dec 30 00:55:06 2010
@@ -7,7 +7,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-our $VERSION = '1.892';
+our $VERSION = '1.893';
 
 %EXPORT_TAGS =
 (
@@ -1622,14 +1622,14 @@
               :                       q{, }
               ;
 
-    my $final_sep = !exists $opt{final_sep}      ? "$sep $conj"
+    my $final_sep = !exists $opt{final_sep}        ? "$sep $conj"
                     : length($opt{final_sep}) == 0 ? $conj
-                    :                                  "$opt{final_sep} $conj"
+                    :                                "$opt{final_sep} $conj"
                     ;
     $final_sep =~ s/\s+/ /gmxs;
     $final_sep =~ s/^ (?=[^\W\d_])  |  (?<=[^\W\d_]) $/ /gxms;
 
-    return join($sep, @words[0, at words-2]) . "$final_sep$words[-1]";
+    return join($sep, @words[0.. at words-2]) . "$final_sep$words[-1]";
 }
 
 
@@ -1644,7 +1644,7 @@
 
 =head1 VERSION
 
-This document describes version 1.892 of Lingua::EN::Inflect
+This document describes version 1.893 of Lingua::EN::Inflect
 
 =head1 SYNOPSIS
 

Modified: branches/upstream/liblingua-en-inflect-perl/current/t/inflections.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/t/inflections.t?rev=66634&op=diff
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/t/inflections.t (original)
+++ branches/upstream/liblingua-en-inflect-perl/current/t/inflections.t Thu Dec 30 00:55:06 2010
@@ -14,77 +14,77 @@
 my $count = 2;
 sub ok($;$$)
 {
-	my $ok = $_[0];
-	print "not " unless $ok;
-	print "ok $count";
-	print "\t# $_[1]" if $_[1];
-	print " -> $_[2]" if $_[2];
-	print "\n";
-	$count++;
-	return $ok;
+    my $ok = $_[0];
+    print "not " unless $ok;
+    print "ok $count";
+    print "\t# $_[1]" if $_[1];
+    print " -> $_[2]" if $_[2];
+    print "\n";
+    $count++;
+    return $ok;
 }
 
 ######################### End of black magic.
 
 sub test_eq($$)
 {
-	PL_eq($_[0],$_[1])    ||
-	PL_N_eq($_[0],$_[1])  ||
-	PL_V_eq($_[0],$_[1])  ||
-	PL_ADJ_eq($_[0],$_[1]);
+    PL_eq($_[0],$_[1])    ||
+    PL_N_eq($_[0],$_[1])  ||
+    PL_V_eq($_[0],$_[1])  ||
+    PL_ADJ_eq($_[0],$_[1]);
 }
 
 foreach (<DATA>)
 {
     #        1            2               3         4    5
-	if (/^\s*(.*?)\s*->\s*(.*?)\s*(?:\|\s*(.*?)\s*)?(#\s*(.*))?$/)
-	{
-		$singular     = $1;
-		$mod_plural   = $2;
-		$class_plural = $3 || $2;
-		$comment      = $5 || '';
-		$is_nv        = ($comment =~ /verb/i) ? '_V'
-			          : ($comment =~ /noun/i) ? '_N'
-			          : '';
+    if (/^\s*(.*?)\s*->\s*(.*?)\s*(?:\|\s*(.*?)\s*)?(#\s*(.*))?$/)
+    {
+        $singular     = $1;
+        $mod_plural   = $2;
+        $class_plural = $3 || $2;
+        $comment      = $5 || '';
+        $is_nv        = ($comment =~ /verb/i) ? '_V'
+                      : ($comment =~ /noun/i) ? '_N'
+                      : '';
 
         classical all=>0, names=>0;
-		$mod_PL_V     = PL_V($singular);
-		$mod_PL_N     = PL_N($singular);
-		$mod_PL       = PL($singular);
-		$mod_PL_val   = ($is_nv eq '_V') ? $mod_PL_V
-			          : ($is_nv eq '_N') ? $mod_PL_N
-			          : $mod_PL;
+        $mod_PL_V     = PL_V($singular);
+        $mod_PL_N     = PL_N($singular);
+        $mod_PL       = PL($singular);
+        $mod_PL_val   = ($is_nv eq '_V') ? $mod_PL_V
+                      : ($is_nv eq '_N') ? $mod_PL_N
+                      : $mod_PL;
 
         classical all=>1;
-		$class_PL_V     = PL_V($singular);
-		$class_PL_N     = PL_N($singular);
-		$class_PL       = PL($singular);
-		$class_PL_val   = ($is_nv eq '_V') ? $class_PL_V
-			            : ($is_nv eq '_N') ? $class_PL_N
-			            : $class_PL;
-
-		ok (
-			($mod_plural eq $mod_PL_val) 
-		    &&
-			($class_plural eq $class_PL_val) 
-		    &&
-			( test_eq($singular,$mod_plural) && test_eq($mod_plural,$singular) )
-		    &&
-			( test_eq($singular,$class_plural) && test_eq($class_plural,$singular) )
-		   , $singular
+        $class_PL_V     = PL_V($singular);
+        $class_PL_N     = PL_N($singular);
+        $class_PL       = PL($singular);
+        $class_PL_val   = ($is_nv eq '_V') ? $class_PL_V
+                        : ($is_nv eq '_N') ? $class_PL_N
+                        : $class_PL;
+
+        ok (
+            ($mod_plural eq $mod_PL_val) 
+            &&
+            ($class_plural eq $class_PL_val) 
+            &&
+            ( test_eq($singular,$mod_plural) && test_eq($mod_plural,$singular) )
+            &&
+            ( test_eq($singular,$class_plural) && test_eq($class_plural,$singular) )
+           , $singular
            , $mod_PL_val eq $class_PL_val ? $mod_PL_val : "$mod_PL_val|$class_PL_val"
-		   )
-	}
-
-
-	elsif (/^\s+(an?)\s+(.*?)\s*$/)
-	{
-		$article = $1;
-		$word    = $2;
-		$Aword   = A($word);
-
-		ok ("$article $word" eq $Aword, "$article $word");
-	}
+           )
+    }
+
+
+    elsif (/^\s+(an?)\s+(.*?)\s*$/)
+    {
+        $article = $1;
+        $word    = $2;
+        $Aword   = A($word);
+
+        ok ("$article $word" eq $Aword, "$article $word");
+    }
 }
 
 classical 0;

Modified: branches/upstream/liblingua-en-inflect-perl/current/t/wordlist.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblingua-en-inflect-perl/current/t/wordlist.t?rev=66634&op=diff
==============================================================================
--- branches/upstream/liblingua-en-inflect-perl/current/t/wordlist.t (original)
+++ branches/upstream/liblingua-en-inflect-perl/current/t/wordlist.t Thu Dec 30 00:55:06 2010
@@ -3,6 +3,28 @@
 
 my @words;
 
+# Four words...
+ at words = qw(apple banana carrot tomato);
+
+is WORDLIST(@words),
+  "apple, banana, carrot, and tomato"
+   => 'plain 4 words';
+
+is WORDLIST(@words, {final_sep=>''}),
+  "apple, banana, carrot and tomato"
+   => '4 words, no final sep';
+
+is WORDLIST(@words, {final_sep=>'...'}),
+  "apple, banana, carrot... and tomato"
+   => '4 words, different final sep';
+
+is WORDLIST(@words, {final_sep=>'...', conj=>''}),
+  "apple, banana, carrot... tomato"
+   => '4 words, different final sep, no conjunction';
+
+is WORDLIST(@words, {conj=>'or'}),
+  "apple, banana, carrot, or tomato"
+   => '4 words, different conjunction';
 
 # Three words...
 @words = qw(apple banana carrot);




More information about the Pkg-perl-cvs-commits mailing list