r11312 - in /branches/upstream/libmath-nocarry-perl/current: Changes MANIFEST META.yml Makefile.PL README examples/ examples/README 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:40:53 UTC 2007
Author: gregoa-guest
Date: Mon Dec 17 17:40:52 2007
New Revision: 11312
URL: http://svn.debian.org/wsvn/?sc=1&rev=11312
Log:
[svn-upgrade] Integrating new upstream version, libmath-nocarry-perl (1.11)
Added:
branches/upstream/libmath-nocarry-perl/current/examples/
branches/upstream/libmath-nocarry-perl/current/examples/README
Modified:
branches/upstream/libmath-nocarry-perl/current/Changes
branches/upstream/libmath-nocarry-perl/current/MANIFEST
branches/upstream/libmath-nocarry-perl/current/META.yml
branches/upstream/libmath-nocarry-perl/current/Makefile.PL
branches/upstream/libmath-nocarry-perl/current/README
branches/upstream/libmath-nocarry-perl/current/lib/NoCarry.pm
branches/upstream/libmath-nocarry-perl/current/t/add.t
branches/upstream/libmath-nocarry-perl/current/t/load.t
branches/upstream/libmath-nocarry-perl/current/t/multiply.t
branches/upstream/libmath-nocarry-perl/current/t/pod.t
branches/upstream/libmath-nocarry-perl/current/t/pod_coverage.t
branches/upstream/libmath-nocarry-perl/current/t/prereq.t
branches/upstream/libmath-nocarry-perl/current/t/subtract.t
branches/upstream/libmath-nocarry-perl/current/t/test_manifest
Modified: branches/upstream/libmath-nocarry-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/Changes?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/Changes (original)
+++ branches/upstream/libmath-nocarry-perl/current/Changes Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/MANIFEST?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/MANIFEST (original)
+++ branches/upstream/libmath-nocarry-perl/current/MANIFEST Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/META.yml?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/META.yml (original)
+++ branches/upstream/libmath-nocarry-perl/current/META.yml Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/Makefile.PL?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/Makefile.PL (original)
+++ branches/upstream/libmath-nocarry-perl/current/Makefile.PL Mon Dec 17 17:40:52 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.3',
},
Modified: branches/upstream/libmath-nocarry-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/README?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/README (original)
+++ branches/upstream/libmath-nocarry-perl/current/README Mon Dec 17 17:40:52 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
Added: branches/upstream/libmath-nocarry-perl/current/examples/README
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/examples/README?rev=11312&op=file
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/examples/README (added)
+++ branches/upstream/libmath-nocarry-perl/current/examples/README Mon Dec 17 17:40:52 2007
@@ -1,0 +1,1 @@
+See the tests in the t/ directory for examples until I add some more.
Modified: branches/upstream/libmath-nocarry-perl/current/lib/NoCarry.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/lib/NoCarry.pm?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/lib/NoCarry.pm (original)
+++ branches/upstream/libmath-nocarry-perl/current/lib/NoCarry.pm Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/add.t
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/add.t?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/add.t (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/add.t Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/load.t
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/load.t?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/load.t (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/load.t Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/multiply.t
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/multiply.t?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/multiply.t (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/multiply.t Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/pod.t?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/pod.t (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/pod.t Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/pod_coverage.t
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/pod_coverage.t?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/pod_coverage.t (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/pod_coverage.t Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/prereq.t
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/prereq.t?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/prereq.t (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/prereq.t Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/subtract.t
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/subtract.t?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/subtract.t (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/subtract.t Mon Dec 17 17:40:52 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: branches/upstream/libmath-nocarry-perl/current/t/test_manifest
URL: http://svn.debian.org/wsvn/branches/upstream/libmath-nocarry-perl/current/t/test_manifest?rev=11312&op=diff
==============================================================================
--- branches/upstream/libmath-nocarry-perl/current/t/test_manifest (original)
+++ branches/upstream/libmath-nocarry-perl/current/t/test_manifest Mon Dec 17 17:40:52 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