r59845 - in /trunk/libset-intspan-perl: Changes IntSpan.pm META.yml README debian/changelog debian/control debian/copyright debian/rules debian/source/ debian/source/format t/index.t

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sun Jun 27 07:22:05 UTC 2010


Author: ansgar-guest
Date: Sun Jun 27 07:21:38 2010
New Revision: 59845

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=59845
Log:
* New upstream release.
* debian/copyright: Update years of copyright.
* debian/copyright: Formatting changes for current DEP-5 proposal.
* Use source format 3.0 (quilt).
* Use tiny debian/rules.
* debian/control: State that this is a Perl module in the description.
* Bump Standards-Version to 3.8.4.

Added:
    trunk/libset-intspan-perl/debian/source/
    trunk/libset-intspan-perl/debian/source/format
Modified:
    trunk/libset-intspan-perl/Changes
    trunk/libset-intspan-perl/IntSpan.pm
    trunk/libset-intspan-perl/META.yml
    trunk/libset-intspan-perl/README
    trunk/libset-intspan-perl/debian/changelog
    trunk/libset-intspan-perl/debian/control
    trunk/libset-intspan-perl/debian/copyright
    trunk/libset-intspan-perl/debian/rules
    trunk/libset-intspan-perl/t/index.t

Modified: trunk/libset-intspan-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/Changes?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/Changes (original)
+++ trunk/libset-intspan-perl/Changes Sun Jun 27 07:21:38 2010
@@ -1,4 +1,7 @@
-jRevision history for Perl extension Set::IntSpan
+Revision history for Perl extension Set::IntSpan
+
+1.14  2010 Jun 22
+        - added ord() method
 
 1.13  2007 Oct 27
         - recoded member(), insert(), and remove() to use a binary search

Modified: trunk/libset-intspan-perl/IntSpan.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/IntSpan.pm?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/IntSpan.pm (original)
+++ trunk/libset-intspan-perl/IntSpan.pm Sun Jun 27 07:21:38 2010
@@ -6,7 +6,7 @@
 use base qw(Exporter);
 use Carp;
 
-our $VERSION   = '1.13';
+our $VERSION   = '1.14';
 our @EXPORT_OK = qw(grep_set map_set grep_spans map_spans);
 
 use overload
@@ -1334,7 +1334,6 @@
     $i < 0 ? $set->_at_neg($i) : $set->_at_pos($i)
 }
 
-
 sub _at_pos
 {
     my($set, $i) = @_;
@@ -1381,6 +1380,38 @@
 
     @edges ? $edges[0] + $i : undef
 }
+
+sub ord
+{
+    my($set, $n) = @_;
+
+    $set->{negInf} and
+	croak "Set::IntSpan::ord: negative infinite set\n";
+
+    defined $n or return undef;
+
+    my $i = 0;
+    my @edges = @{$set->{edges}};
+
+    while (@edges)
+    {
+	my($lower, $upper) = splice(@edges, 0, 2);
+
+	$n <= $lower and return undef;
+
+	if (defined $upper and $upper < $n)
+	{
+	    $i += $upper - $lower;
+	    next;
+	}
+
+	return $i + $n - $lower - 1;
+    }
+
+    undef
+}
+
+
 
 sub slice
 {
@@ -1612,6 +1643,7 @@
 
   $n       = $set->at($i);
   $slice   = $set->slice($from, $to);
+  $i       = $set->ord($n);
 
 =head2 Operator overloads
 
@@ -2278,6 +2310,14 @@
 
 =back
 
+=item I<$i> = I<$set>->C<ord>($n)
+
+The inverse of C<at>.
+
+Returns the index I<$i> of the integer I<$n> in I<$set>,
+or C<undef> if I<$n> if not an element of I<$set>.
+
+Dies if I<$set> is C<neg_inf>.
 
 =back
 
@@ -2473,6 +2513,10 @@
 
 (F) C<slice> was called with I<$from> negative on a positive infinite set.
 
+=item C<Set::IntSpan::ord: negative infinite set>
+
+(F) C<ord> was called on a negative infinite set.
+
 =item Out of memory!
 
 (X) C<elements> I<$set> can generate an "Out of memory!"
@@ -2608,7 +2652,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 1996-2007 by Steven McDougall. This module is free
+Copyright (c) 1996-2010 by Steven McDougall. This module is free
 software; you can redistribute it and/or modify it under the same
 terms as Perl itself.
 

Modified: trunk/libset-intspan-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/META.yml?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/META.yml (original)
+++ trunk/libset-intspan-perl/META.yml Sun Jun 27 07:21:38 2010
@@ -1,13 +1,21 @@
 --- #YAML:1.0
-name:                Set-IntSpan
-version:             1.13
-abstract:            Manages sets of integers, newsrc style
-license:             ~
-generated_by:        ExtUtils::MakeMaker version 6.32
-distribution_type:   module
-requires:     
-meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
+name:               Set-IntSpan
+version:            1.14
+abstract:           Manages sets of integers, newsrc style
 author:
     - Steven McDougall (swmcd at world.std.com)
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:  {}
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.56
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: trunk/libset-intspan-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/README?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/README (original)
+++ trunk/libset-intspan-perl/README Sun Jun 27 07:21:38 2010
@@ -27,7 +27,7 @@
 
 
 COPYRIGHT
-Copyright (c) 1996-2007 by Steven McDougall. This module is free
+Copyright (c) 1996-2010 by Steven McDougall. This module is free
 software; you can redistribute it and/or modify it under the same
 terms as Perl itself.
 

Modified: trunk/libset-intspan-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/debian/changelog?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/debian/changelog (original)
+++ trunk/libset-intspan-perl/debian/changelog Sun Jun 27 07:21:38 2010
@@ -1,4 +1,4 @@
-libset-intspan-perl (1.13-3) UNRELEASED; urgency=low
+libset-intspan-perl (1.14-1) unstable; urgency=low
 
   [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
@@ -13,7 +13,16 @@
     perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as
     permitted by Debian Policy 3.8.3).
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 16 Nov 2008 20:46:49 +0100
+  [ Ansgar Burchardt ]
+  * New upstream release.
+  * debian/copyright: Update years of copyright.
+  * debian/copyright: Formatting changes for current DEP-5 proposal.
+  * Use source format 3.0 (quilt).
+  * Use tiny debian/rules.
+  * debian/control: State that this is a Perl module in the description.
+  * Bump Standards-Version to 3.8.4.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org>  Sun, 27 Jun 2010 16:21:03 +0900
 
 libset-intspan-perl (1.13-2) unstable; urgency=low
 

Modified: trunk/libset-intspan-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/debian/control?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/debian/control (original)
+++ trunk/libset-intspan-perl/debian/control Sun Jun 27 07:21:38 2010
@@ -5,7 +5,7 @@
 Build-Depends-Indep: perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Ansgar Burchardt <ansgar at 43-1.org>
-Standards-Version: 3.8.0
+Standards-Version: 3.8.4
 Homepage: http://search.cpan.org/dist/Set-IntSpan/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libset-intspan-perl/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libset-intspan-perl/
@@ -13,7 +13,7 @@
 Package: libset-intspan-perl
 Architecture: all
 Depends: ${misc:Depends}, ${perl:Depends}
-Description: Manages sets of integers
- Set::IntSpan manages sets of integers.
+Description: Perl module to manage sets of integers
+ The Set::IntSpan module manages sets of integers.
  It is optimized for sets that have long runs of consecutive integers.
  These arise, for example, in .newsrc files, which maintain lists of articles.

Modified: trunk/libset-intspan-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/debian/copyright?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/debian/copyright (original)
+++ trunk/libset-intspan-perl/debian/copyright Sun Jun 27 07:21:38 2010
@@ -1,27 +1,29 @@
-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=226
-Upstream-Name: Set-IntSpan
-Upstream-Maintainer: Steven McDougall <swmcd at world.std.com>
-Upstream-Source: http://search.cpan.org/dist/Set-IntSpan/
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Name: Set-IntSpan
+Maintainer: Steven McDougall <swmcd at world.std.com>
+Source: http://search.cpan.org/dist/Set-IntSpan/
 
-Files: *
-Copyright: © 1997-2007, Steven McDougall <swmcd at world.std.com>
-License: GPL-1+ | Artistic
- This module is free software; you can redistribute it and/or modify it under
- the same terms as Perl itself.
- .
- Perl is distributed under the GNU General Public License, either version 1 or
- (at your opinion) any later version, and the Artistic License.
- .
- On Debian systems, the complete text of the GNU General Public License can be
- found in /usr/share/common-licenses/GPL and the Artistic license in
- /usr/share/common-licenses/Artistic.
+Copyright: 1997-2010, Steven McDougall <swmcd at world.std.com>
+License: Artistic or GPL-1+
 
 Files: debian/*
-Copyright: © 2000-2002, Mike Mattice <mattice at debian.org>
-           © 2006, Stephen Quinney <sjq at debian.org>
-           © 2008, Anibal Monsalve Salazar <anibal at debian.org>
-           © 2008, Ansgar Burchardt <ansgar at 43-1.org>
-License: GPL-1+ | Artistic
- It is assumed that all contributors release their work under the same terms
- as the module and Perl.
+Copyright:
+ 2000-2002, Mike Mattice <mattice at debian.org>
+ 2006,      Stephen Quinney <sjq at debian.org>
+ 2008,      Anibal Monsalve Salazar <anibal at debian.org>
+ 2008-2010, Ansgar Burchardt <ansgar at 43-1.org>
+License: Artistic or GPL-1+
 
+License: Artistic
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Artistic License, which comes with Perl.
+    On Debian GNU/Linux systems, the complete text of the Artistic License
+    can be found in `/usr/share/common-licenses/Artistic'
+
+License: GPL-1+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 1, or (at your option)
+    any later version.
+    On Debian GNU/Linux systems, the complete text of the GNU General
+    Public License can be found in `/usr/share/common-licenses/GPL'

Modified: trunk/libset-intspan-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/debian/rules?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/debian/rules (original)
+++ trunk/libset-intspan-perl/debian/rules Sun Jun 27 07:21:38 2010
@@ -1,23 +1,4 @@
 #!/usr/bin/make -f
 
-build: build-stamp
-build-stamp:
-	dh build
-	touch $@
-
-clean:
+%:
 	dh $@
-
-install: install-stamp
-install-stamp: build-stamp
-	dh install
-	touch $@
-
-binary-arch:
-
-binary-indep: install
-	dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build

Added: trunk/libset-intspan-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/debian/source/format?rev=59845&op=file
==============================================================================
--- trunk/libset-intspan-perl/debian/source/format (added)
+++ trunk/libset-intspan-perl/debian/source/format Sun Jun 27 07:21:38 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)

Modified: trunk/libset-intspan-perl/t/index.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libset-intspan-perl/t/index.t?rev=59845&op=diff
==============================================================================
--- trunk/libset-intspan-perl/t/index.t (original)
+++ trunk/libset-intspan-perl/t/index.t Sun Jun 27 07:21:38 2010
@@ -22,8 +22,8 @@
 (
  [ "(-0",  42, "<die>" ],
  [ "0-)", -42, "<die>" ],
-)
-;
+);
+
 my @At_test =
 (
  [ "-"	       	     ,   0, undef ],
@@ -376,7 +376,7 @@
 {
     my($run_list, $i) = @$test;
 
-    eval { Set::IntSpan->net($run_list)->at($i) };
+    eval { Set::IntSpan->new($run_list)->at($i) };
     $@ or Not; OK("at", $test);
 }
 




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