r11314 - in /trunk/libmath-nocarry-perl: Changes MANIFEST META.yml Makefile.PL README debian/changelog examples/ lib/NoCarry.pm t/add.t t/load.t t/multiply.t t/pod.t t/pod_coverage.t t/prereq.t t/subtract.t t/test_manifest

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Mon Dec 17 17:44:31 UTC 2007


Author: gregoa-guest
Date: Mon Dec 17 17:44:31 2007
New Revision: 11314

URL: http://svn.debian.org/wsvn/?sc=1&rev=11314
Log:
New upstream version.

Added:
    trunk/libmath-nocarry-perl/examples/
      - copied from r11313, branches/upstream/libmath-nocarry-perl/current/examples/
Modified:
    trunk/libmath-nocarry-perl/Changes
    trunk/libmath-nocarry-perl/MANIFEST
    trunk/libmath-nocarry-perl/META.yml
    trunk/libmath-nocarry-perl/Makefile.PL
    trunk/libmath-nocarry-perl/README
    trunk/libmath-nocarry-perl/debian/changelog
    trunk/libmath-nocarry-perl/lib/NoCarry.pm
    trunk/libmath-nocarry-perl/t/add.t
    trunk/libmath-nocarry-perl/t/load.t
    trunk/libmath-nocarry-perl/t/multiply.t
    trunk/libmath-nocarry-perl/t/pod.t
    trunk/libmath-nocarry-perl/t/pod_coverage.t
    trunk/libmath-nocarry-perl/t/prereq.t
    trunk/libmath-nocarry-perl/t/subtract.t
    trunk/libmath-nocarry-perl/t/test_manifest

Modified: trunk/libmath-nocarry-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/Changes?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/Changes (original)
+++ trunk/libmath-nocarry-perl/Changes Mon Dec 17 17:44:31 2007
@@ -1,4 +1,9 @@
 Revision history for Perl extension Math::NoCarry.
+
+1.11 - Sun Dec  9 00:37:35 2007
+	* Now all the functions are exportable on demand.
+	* Distro requires 5.006, although it probably stills works on
+	earlier versions. I'm not actively supporting those though.
 
 1.10 - Tue Jan  9 22:33:59 2007
 	* updated copyright and license info

Modified: trunk/libmath-nocarry-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/MANIFEST?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/MANIFEST (original)
+++ trunk/libmath-nocarry-perl/MANIFEST Mon Dec 17 17:44:31 2007
@@ -1,9 +1,9 @@
 Changes
+examples/README
 lib/NoCarry.pm
 LICENSE
 Makefile.PL
 MANIFEST
-META.yml
 README
 t/add.t
 t/load.t
@@ -13,3 +13,4 @@
 t/prereq.t
 t/subtract.t
 t/test_manifest
+META.yml                                 Module meta-data (added by MakeMaker)

Modified: trunk/libmath-nocarry-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/META.yml?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/META.yml (original)
+++ trunk/libmath-nocarry-perl/META.yml Mon Dec 17 17:44:31 2007
@@ -1,12 +1,14 @@
 --- #YAML:1.0
 name:                Math-NoCarry
-version:             1.10
-abstract:            ~
+version:             1.11
+abstract:            Perl extension for no carry arithmetic
 license:             perl
-generated_by:        ExtUtils::MakeMaker version 6.31
+generated_by:        ExtUtils::MakeMaker version 6.36
 distribution_type:   module
 requires:     
     Test::More:                    0
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3
+author:
+    - brian d foy <bdfoy at cpan.org>

Modified: trunk/libmath-nocarry-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/Makefile.PL?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/Makefile.PL (original)
+++ trunk/libmath-nocarry-perl/Makefile.PL Mon Dec 17 17:44:31 2007
@@ -1,19 +1,26 @@
-# $Id: Makefile.PL,v 1.4 2007/01/10 04:33:25 comdog Exp $
+# $Id: Makefile.PL 2454 2007-12-09 06:29:57Z comdog $
 use ExtUtils::MakeMaker;
+
+require 5.006;
 
 eval "use Test::Manifest 1.14";
 
 WriteMakefile
 	(
-	'NAME'           => 'Math::NoCarry',
-	'VERSION_FROM'   => 'lib/NoCarry.pm',
-	'LICENSE'       => 'perl',
+	'NAME'         => 'Math::NoCarry',
+	'ABSTRACT'     => 'Perl extension for no carry arithmetic',
+	'VERSION_FROM' => 'lib/NoCarry.pm',
+	'LICENSE'      => 'perl',
+	'AUTHOR'       => 'brian d foy <bdfoy at cpan.org>',
+	
 	'PM'             => {
 		'lib/NoCarry.pm'    => '$(INST_LIBDIR)/NoCarry.pm',
 		},
+
 	'PREREQ_PM' => {
 		'Test::More'       => '0',
 		},
+
 	'MAN3PODS'     => {
 		'lib/NoCarry.pm' => '$(INST_MAN3DIR)/Math::NoCarry.3pm',
 		},

Modified: trunk/libmath-nocarry-perl/README
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/README?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/README (original)
+++ trunk/libmath-nocarry-perl/README Mon Dec 17 17:44:31 2007
@@ -1,4 +1,4 @@
-$Id: README,v 1.1 2004/09/08 08:30:21 comdog Exp $
+$Id: README 1467 2004-09-08 08:30:22Z comdog $
 
 You can install this using in the usual Perl fashion
 

Modified: trunk/libmath-nocarry-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/debian/changelog?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/debian/changelog (original)
+++ trunk/libmath-nocarry-perl/debian/changelog Mon Dec 17 17:44:31 2007
@@ -1,5 +1,6 @@
-libmath-nocarry-perl (1.10-2) UNRELEASED; urgency=low
+libmath-nocarry-perl (1.11-1) UNRELEASED; urgency=low
 
+  * New upstream version.
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
     field (source stanza); Homepage field (source stanza). Removed: XS-
     Vcs-Svn fields.

Modified: trunk/libmath-nocarry-perl/lib/NoCarry.pm
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/lib/NoCarry.pm?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/lib/NoCarry.pm (original)
+++ trunk/libmath-nocarry-perl/lib/NoCarry.pm Mon Dec 17 17:44:31 2007
@@ -1,11 +1,18 @@
-# $Id: NoCarry.pm,v 1.10 2007/01/10 04:33:25 comdog Exp $
+# $Id: NoCarry.pm 2454 2007-12-09 06:29:57Z comdog $
 package Math::NoCarry;
 use strict;
 
+use warnings;
+no warnings;
+
 use base qw(Exporter);
 
-use vars qw($VERSION);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.10 $ =~ m/ (\d+) \. (\d+) /xg;
+use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS);
+
+ at EXPORT_OK = qw(add subtract multiply);
+%EXPORT_TAGS =  ( all => [ @EXPORT_OK ] );
+
+$VERSION = 1.11;
 
 =head1 NAME
 
@@ -13,13 +20,13 @@
 
 =head1 SYNOPSIS
 
-	use Math::NoCarry;
-
-	my $sum        = Math::NoCarry::add( 123, 456 );
-
-	my $difference = Math::NoCarry::subtract( 123, 456 );
-
-	my $product    = Math::NoCarry::multiply( 123, 456 );
+	use Math::NoCarry qw(:all);
+
+	my $sum        = add( 123, 456 );
+
+	my $difference = subtract( 123, 456 );
+
+	my $product    = multiply( 123, 456 );
 
 =head1 DESCRIPTION
 
@@ -64,7 +71,8 @@
 
 =head2 Functions
 
-This module does not export any functions.
+As of version 1.11, all of these functions are exportable on
+demand, or with the tag C<:all> to get them all at once.
 
 =over 4
 
@@ -209,7 +217,7 @@
 =head1 SOURCE AVAILABILITY
 
 This source is part of a SourceForge project which always has the
-latest sources in CVS, as well as all of the previous releases.
+latest sources in SVN, as well as all of the previous releases.
 
 	http://sourceforge.net/projects/brian-d-foy/
 

Modified: trunk/libmath-nocarry-perl/t/add.t
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/add.t?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/add.t (original)
+++ trunk/libmath-nocarry-perl/t/add.t Mon Dec 17 17:44:31 2007
@@ -1,1 +1,59 @@
-BEGIN { print "1..4\n"; }

END { print "not ok\n" unless $loaded }

use Math::NoCarry;

$loaded = 1;

print "ok\n";

my @triads = (
	[qw(123 456 579)],
	[qw(890 135 925)],
	[qw(456 879 225)],
	);

eval {	
	foreach my $triad ( @triads )
		{
		my( $n, $m, $expected ) = @$triad;
		
		my $sum1 = Math::NoCarry::add( $n, $m );
		my $sum2 = Math::NoCarry::add( $m, $n );
		
		die "Different results for different orders!\n" .
			"[$n + $m] gave [$sum1]\n[$m + $n] gave [$sum2]\n"
			if $sum1 != $sum2;
		
		die "[$n + $m] gave [$sum1], but I expected [$expected]\n"
			unless $sum1 == $expected;
		}
	};
print STDERR $@ if $@;
print $@ ? 'not ' : '', "ok\n";
	
eval {	
	foreach my $triad ( @triads )
		{
		foreach my $n ( @$triad )
			{
			my $sum = Math::NoCarry::add( $n );
			
			die "[$n] gave [$sum], but I expected [$n]\n"
				unless $sum == $n;
			}
		}
	};
print STDERR $@ if $@;
print $@ ? 'not ' : '', "ok\n";

eval {	
	my $sum = Math::NoCarry::add();
			
	die "[NULL] gave [$sum], but I expected [FALSE]\n"
				if $sum;
	};
print STDERR $@ if $@;
print $@ ? 'not ' : '', "ok\n";

+BEGIN { print "1..4\n"; }
+
+END { print "not ok\n" unless $loaded }
+
+use Math::NoCarry;
+
+$loaded = 1;
+
+print "ok\n";
+
+my @triads = (
+	[qw(123 456 579)],
+	[qw(890 135 925)],
+	[qw(456 879 225)],
+	);
+
+eval {	
+	foreach my $triad ( @triads )
+		{
+		my( $n, $m, $expected ) = @$triad;
+		
+		my $sum1 = Math::NoCarry::add( $n, $m );
+		my $sum2 = Math::NoCarry::add( $m, $n );
+		
+		die "Different results for different orders!\n" .
+			"[$n + $m] gave [$sum1]\n[$m + $n] gave [$sum2]\n"
+			if $sum1 != $sum2;
+		
+		die "[$n + $m] gave [$sum1], but I expected [$expected]\n"
+			unless $sum1 == $expected;
+		}
+	};
+print STDERR $@ if $@;
+print $@ ? 'not ' : '', "ok\n";
+	
+eval {	
+	foreach my $triad ( @triads )
+		{
+		foreach my $n ( @$triad )
+			{
+			my $sum = Math::NoCarry::add( $n );
+			
+			die "[$n] gave [$sum], but I expected [$n]\n"
+				unless $sum == $n;
+			}
+		}
+	};
+print STDERR $@ if $@;
+print $@ ? 'not ' : '', "ok\n";
+
+eval {	
+	my $sum = Math::NoCarry::add();
+			
+	die "[NULL] gave [$sum], but I expected [FALSE]\n"
+				if $sum;
+	};
+print STDERR $@ if $@;
+print $@ ? 'not ' : '', "ok\n";
+

Modified: trunk/libmath-nocarry-perl/t/load.t
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/load.t?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/load.t (original)
+++ trunk/libmath-nocarry-perl/t/load.t Mon Dec 17 17:44:31 2007
@@ -1,4 +1,4 @@
-# $Id: load.t,v 1.1 2004/09/08 08:30:22 comdog Exp $
+# $Id: load.t 1467 2004-09-08 08:30:22Z comdog $
 BEGIN {
 	@classes = qw(Math::NoCarry);
 	}

Modified: trunk/libmath-nocarry-perl/t/multiply.t
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/multiply.t?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/multiply.t (original)
+++ trunk/libmath-nocarry-perl/t/multiply.t Mon Dec 17 17:44:31 2007
@@ -1,1 +1,68 @@
-BEGIN { print "1..4\n"; }

END { print "not ok\n" unless $loaded }

use Math::NoCarry;

$loaded = 1;

print "ok\n";

my @triads = (
	[qw( 123  456  43878)],
	[qw(-123 -456  43878)],
	[qw(-123  456 -43878)],
	[qw( 123 -456 -43878)],
	
	[qw(456 123 43878)],
	[qw(456 879 28974)],
	[qw(879 456 28974)],

	[qw(  890 135  83750)],
	[qw( 135  890  83750)],
	[qw(-135  890 -83750)],
	[qw( 135 -890 -83750)],
	[qw(-135 -890  83750)],

	[qw(500 321 50500)],
	[qw(321 500 50500)],
	);

eval {	
	foreach my $triad ( @triads )
		{
		my( $n, $m, $expected ) = @$triad;
		
		my $product = Math::NoCarry::multiply( $n, $m );
				
		die "[$n x $m] gave [$product], but I expected [$expected]\n"
			unless $product == $expected;
		}
	};
print STDERR $@ if $@;
print $@ ? 'not ' : '', "ok\n";

eval {	
	foreach my $triad ( @triads )
		{
		foreach my $n ( @$triad )
			{
			my $product = Math::NoCarry::multiply( $n );
			
			die "[$n] gave [$product], but I expected [$n]\n"
				unless $product == $n;
			}
		}
	};
print STDERR $@ if $@;
print $@ ? 'not ' : '', "ok\n";

eval {	
	my $product = Math::NoCarry::multiply();
			
	die "[NULL] gave [$product], but I expected [FALSE]\n"
				if $product;
	};
print STDERR $@ if $@;
print $@ ? 'not ' : '', "ok\n";

+BEGIN { print "1..4\n"; }
+
+END { print "not ok\n" unless $loaded }
+
+use Math::NoCarry;
+
+$loaded = 1;
+
+print "ok\n";
+
+my @triads = (
+	[qw( 123  456  43878)],
+	[qw(-123 -456  43878)],
+	[qw(-123  456 -43878)],
+	[qw( 123 -456 -43878)],
+	
+	[qw(456 123 43878)],
+	[qw(456 879 28974)],
+	[qw(879 456 28974)],
+
+	[qw(  890 135  83750)],
+	[qw( 135  890  83750)],
+	[qw(-135  890 -83750)],
+	[qw( 135 -890 -83750)],
+	[qw(-135 -890  83750)],
+
+	[qw(500 321 50500)],
+	[qw(321 500 50500)],
+	);
+
+eval {	
+	foreach my $triad ( @triads )
+		{
+		my( $n, $m, $expected ) = @$triad;
+		
+		my $product = Math::NoCarry::multiply( $n, $m );
+				
+		die "[$n x $m] gave [$product], but I expected [$expected]\n"
+			unless $product == $expected;
+		}
+	};
+print STDERR $@ if $@;
+print $@ ? 'not ' : '', "ok\n";
+
+eval {	
+	foreach my $triad ( @triads )
+		{
+		foreach my $n ( @$triad )
+			{
+			my $product = Math::NoCarry::multiply( $n );
+			
+			die "[$n] gave [$product], but I expected [$n]\n"
+				unless $product == $n;
+			}
+		}
+	};
+print STDERR $@ if $@;
+print $@ ? 'not ' : '', "ok\n";
+
+eval {	
+	my $product = Math::NoCarry::multiply();
+			
+	die "[NULL] gave [$product], but I expected [FALSE]\n"
+				if $product;
+	};
+print STDERR $@ if $@;
+print $@ ? 'not ' : '', "ok\n";
+

Modified: trunk/libmath-nocarry-perl/t/pod.t
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/pod.t?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/pod.t (original)
+++ trunk/libmath-nocarry-perl/t/pod.t Mon Dec 17 17:44:31 2007
@@ -1,4 +1,4 @@
-# $Id: pod.t,v 1.1 2004/09/08 08:30:22 comdog Exp $
+# $Id: pod.t 1467 2004-09-08 08:30:22Z comdog $
 use Test::More;
 eval "use Test::Pod 1.00";
 plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;

Modified: trunk/libmath-nocarry-perl/t/pod_coverage.t
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/pod_coverage.t?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/pod_coverage.t (original)
+++ trunk/libmath-nocarry-perl/t/pod_coverage.t Mon Dec 17 17:44:31 2007
@@ -1,4 +1,4 @@
-# $Id: pod_coverage.t,v 1.1 2005/03/12 03:53:50 comdog Exp $
+# $Id: pod_coverage.t 1591 2005-03-12 03:53:57Z comdog $
 
 use Test::More;
 eval "use Test::Pod::Coverage";

Modified: trunk/libmath-nocarry-perl/t/prereq.t
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/prereq.t?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/prereq.t (original)
+++ trunk/libmath-nocarry-perl/t/prereq.t Mon Dec 17 17:44:31 2007
@@ -1,4 +1,4 @@
-# $Id: prereq.t,v 1.1 2004/09/08 08:30:22 comdog Exp $
+# $Id: prereq.t 1467 2004-09-08 08:30:22Z comdog $
 use Test::More;
 eval "use Test::Prereq";
 plan skip_all => "Test::Prereq required to test dependencies" if $@;

Modified: trunk/libmath-nocarry-perl/t/subtract.t
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/subtract.t?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/subtract.t (original)
+++ trunk/libmath-nocarry-perl/t/subtract.t Mon Dec 17 17:44:31 2007
@@ -1,4 +1,4 @@
-# $Id: subtract.t,v 1.1 2004/09/08 08:30:22 comdog Exp $
+# $Id: subtract.t 1467 2004-09-08 08:30:22Z comdog $
 
 BEGIN { print "1..4\n"; }
 

Modified: trunk/libmath-nocarry-perl/t/test_manifest
URL: http://svn.debian.org/wsvn/trunk/libmath-nocarry-perl/t/test_manifest?rev=11314&op=diff
==============================================================================
--- trunk/libmath-nocarry-perl/t/test_manifest (original)
+++ trunk/libmath-nocarry-perl/t/test_manifest Mon Dec 17 17:44:31 2007
@@ -1,4 +1,4 @@
-# $Id: test_manifest,v 1.2 2005/03/12 03:53:57 comdog Exp $
+# $Id: test_manifest 1591 2005-03-12 03:53:57Z comdog $
 load.t
 pod.t
 pod_coverage.t




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