diff -Nru libsort-naturally-perl-1.02/ChangeLog libsort-naturally-perl-1.03/ChangeLog --- libsort-naturally-perl-1.02/ChangeLog 2004-12-30 03:30:21.000000000 +0000 +++ libsort-naturally-perl-1.03/ChangeLog 2012-04-11 08:47:55.000000000 +0000 @@ -1,10 +1,13 @@ Revision history for Perl module Sort::Naturally - Time-stamp: "2004-12-29 18:30:21 AST" + +2012-04-11 bingos bingos@cpan.org + + * release 1.03 -- modernise the distribution 2004-12-29 Sean M. Burke sburke@cpan.org * Release 1.02 -- just rebundling, no code changes - + 2001-05-25 Sean M. Burke sburke@cpan.org * Release 1.01 -- first public release. diff -Nru libsort-naturally-perl-1.02/debian/changelog libsort-naturally-perl-1.03/debian/changelog --- libsort-naturally-perl-1.02/debian/changelog 2014-05-14 05:24:12.000000000 +0000 +++ libsort-naturally-perl-1.03/debian/changelog 2014-05-13 22:06:28.000000000 +0000 @@ -1,3 +1,37 @@ +libsort-naturally-perl (1.03-1) unstable; urgency=low + + * Team upload. + + [ Nathan Handler ] + * debian/watch: Update to ignore development releases. + + [ Pierre Neyron ] + * debian/copyright: Update Copyright format. + + [ Ansgar Burchardt ] + * debian/control: Convert Vcs-* fields to Git. + + [ Florian Schlichting ] + * Imported Upstream version 1.03. + * Bumped Standards-Version to 3.9.3 (use copyright-format 1.0, dropped + versioned depends on perl <= 5.10.0). + * Bumped dh compatibility to level 8 (no changes necessary). + * Switched to source format 3.0 (quilt). + * Switched to short-form debian/rules. + + [ Salvatore Bonaccorso ] + * Change Vcs-Git to canonical URI (git://anonscm.debian.org) + * Change search.cpan.org based URIs to metacpan.org based URIs + + [ gregor herrmann ] + * Strip trailing slash from metacpan URLs. + + [ Axel Beckert ] + * Apply wrap-and-sort. + * Bump Standards-Version to 3.9.5 (no changes) + + -- Axel Beckert Wed, 14 May 2014 00:06:27 +0200 + libsort-naturally-perl (1.02-1) unstable; urgency=low * Initial Release. Closes: #498837 -- ITP diff -Nru libsort-naturally-perl-1.02/debian/compat libsort-naturally-perl-1.03/debian/compat --- libsort-naturally-perl-1.02/debian/compat 2014-05-14 05:24:12.000000000 +0000 +++ libsort-naturally-perl-1.03/debian/compat 2013-08-29 14:54:12.000000000 +0000 @@ -1 +1 @@ -7 +8 diff -Nru libsort-naturally-perl-1.02/debian/control libsort-naturally-perl-1.03/debian/control --- libsort-naturally-perl-1.02/debian/control 2014-05-14 05:24:12.000000000 +0000 +++ libsort-naturally-perl-1.03/debian/control 2014-05-13 22:05:02.000000000 +0000 @@ -1,18 +1,19 @@ Source: libsort-naturally-perl Section: perl Priority: optional -Build-Depends: debhelper (>= 7) -Build-Depends-Indep: perl (>= 5.6.10-12) +Build-Depends: debhelper (>= 8) +Build-Depends-Indep: perl Maintainer: Debian Perl Group Uploaders: Pierre Neyron -Standards-Version: 3.8.0 -Homepage: http://search.cpan.org/dist/Sort-Naturally/ -Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libsort-naturally-perl/ -Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libsort-naturally-perl/ +Standards-Version: 3.9.5 +Homepage: https://metacpan.org/release/Sort-Naturally +Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libsort-naturally-perl.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libsort-naturally-perl.git Package: libsort-naturally-perl Architecture: all -Depends: ${perl:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, + ${perl:Depends} Description: Sort naturally - sort lexically except for numerical parts Sort::Naturally exports two functions, nsort and ncmp; they are used in implementing the idea of "natural sorting" algorithm. With that natural diff -Nru libsort-naturally-perl-1.02/debian/copyright libsort-naturally-perl-1.03/debian/copyright --- libsort-naturally-perl-1.02/debian/copyright 2014-05-14 05:24:12.000000000 +0000 +++ libsort-naturally-perl-1.03/debian/copyright 2014-05-13 22:02:18.000000000 +0000 @@ -1,19 +1,28 @@ -This is the debian package for the Sort-Naturally module. -It was created by Pierre Neyron using dh-make-perl. -It was downloaded from http://search.cpan.org/dist/Sort-Naturally/ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Contact: Sean M. Burke +Source: https://metacpan.org/release/Sort-Naturally +Upstream-Name: Sort-Naturally -The upstream author is: -Sean M. Burke sburke@cpan.org. +Files: * +Copyright: 2001, Sean M. Burke +License: Artistic or GPL-1+ -Copyright 2001, Sean M. Burke , all rights -reserved. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +Files: debian/* +Copyright: 2009, Pierre Neyron +License: Artistic or GPL-1+ -Perl is distributed under your choice of the GNU General Public License or -the Artistic License. On Debian GNU/Linux systems, the complete text of the -GNU General Public License can be found in `/usr/share/common-licenses/GPL' -and the Artistic Licence in `/usr/share/common-licenses/Artistic'. +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 systems, the complete text of the Artistic License can be + found in `/usr/share/common-licenses/Artistic'. -The Debian packaging is (C) 2008, Pierre Neyron and -is licensed under the same terms as the software itself (see above). +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 systems, the complete text of version 1 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-1'. diff -Nru libsort-naturally-perl-1.02/debian/rules libsort-naturally-perl-1.03/debian/rules --- libsort-naturally-perl-1.02/debian/rules 2014-05-14 05:24:12.000000000 +0000 +++ libsort-naturally-perl-1.03/debian/rules 2013-08-29 14:54:12.000000000 +0000 @@ -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 diff -Nru libsort-naturally-perl-1.02/debian/source/format libsort-naturally-perl-1.03/debian/source/format --- libsort-naturally-perl-1.02/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ libsort-naturally-perl-1.03/debian/source/format 2013-08-29 14:54:12.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru libsort-naturally-perl-1.02/debian/watch libsort-naturally-perl-1.03/debian/watch --- libsort-naturally-perl-1.02/debian/watch 2014-05-14 05:24:12.000000000 +0000 +++ libsort-naturally-perl-1.03/debian/watch 2014-03-05 23:02:43.000000000 +0000 @@ -1,4 +1,4 @@ # format version number, currently 3; this line is compulsory! version=3 # URL to the package page followed by a regex to search -http://search.cpan.org/dist/Sort-Naturally/ .*/Sort-Naturally-v?(\d[\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ +https://metacpan.org/release/Sort-Naturally .*/Sort-Naturally-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ diff -Nru libsort-naturally-perl-1.02/lib/Sort/Naturally.pm libsort-naturally-perl-1.03/lib/Sort/Naturally.pm --- libsort-naturally-perl-1.02/lib/Sort/Naturally.pm 2004-12-30 03:30:03.000000000 +0000 +++ libsort-naturally-perl-1.03/lib/Sort/Naturally.pm 2012-04-11 08:46:08.000000000 +0000 @@ -1,7 +1,7 @@ require 5; package Sort::Naturally; # Time-stamp: "2004-12-29 18:30:03 AST" -$VERSION = '1.02'; +$VERSION = '1.03'; @EXPORT = ('nsort', 'ncmp'); require Exporter; @ISA = ('Exporter'); @@ -55,24 +55,24 @@ } else { $rv = 0; } - + unless($rv) { # Normal case: $rv = 0; DEBUG and print "<$x> and <$y> compared...\n"; - + Consideration: while(length $x and length $y) { - + DEBUG > 2 and print " <$x> and <$y>...\n"; - + # First, non-numeric comparison: $x2 = ($x =~ m/^(\D+)/s) ? length($1) : 0; $y2 = ($y =~ m/^(\D+)/s) ? length($1) : 0; # Now make x2 the min length of the two: $x2 = $y2 if $x2 > $y2; if($x2) { - DEBUG > 1 and printf " <%s> and <%s> lexically for length $x2...\n", + DEBUG > 1 and printf " <%s> and <%s> lexically for length $x2...\n", substr($x,0,$x2), substr($y,0,$x2); do { my $i = substr($x,0,$x2); @@ -81,10 +81,10 @@ print "SCREAM! on <$i><$j> -- $sv != $rv \n" unless $rv == $sv; last; } - - + + if $rv = - # The ''. things here force a copy that seems to work around a + # The ''. things here force a copy that seems to work around a # mysterious intermittent bug that 'use locale' provokes in # many versions of Perl. $cmp @@ -100,7 +100,7 @@ substr($x,0,$x2) = ''; substr($y,0,$x2) = ''; } - + # Now numeric: # (actually just using $x2 and $y2 as scratch) @@ -114,12 +114,12 @@ last if $rv = $x2 <=> $1; } else { # ARBITRARILY large integers! - + # This saves on loss of precision that could happen # with actual stringification. # Also, I sense that very large numbers aren't too # terribly common in sort data. - + # trim leading 0's: ($y2 = $1) =~ s/^0+//s; $x2 =~ s/^0+//s; @@ -138,7 +138,7 @@ # X is numeric but Y isn't $rv = Y_FIRST; last; - } + } } elsif( $y =~ s/^\d+//s ) { # we don't need to capture the substring $rv = X_FIRST; last; @@ -166,7 +166,7 @@ ($cmp,$lc) = @{shift @_} if @_ and ref($_[0]) eq 'ARRAY'; return @_ unless @_ > 1 or wantarray; # be clever - + my($x, $x2, $y, $y2, $rv); # scratch vars # We use a Schwartzian xform to memoize the lc'ing and \W-removal @@ -175,7 +175,7 @@ sort { if($a->[0] eq $b->[0]) { 0 } # trap this expensive case else { - + $x = $a->[1]; $y = $b->[1]; @@ -188,7 +188,7 @@ || ($x cmp $y ) || ($a->[0] cmp $b->[0]) ; - + DEBUG > 1 and print " <${$a}[0]> cmp <${$b}[0]> is $rv ($ORD[$rv])\n"; $rv; }} @@ -220,7 +220,7 @@ } my($a,$b) = @_; my($x, $x2, $y, $y2, $rv); # scratch vars - + DEBUG > 1 and print "ncmp args <$a><$b>\n"; if($a eq $b) { # trap this expensive case 0; @@ -229,7 +229,7 @@ $x =~ s/\W+//s; $y = ($lc ? $lc->($b) : lc($b)); $y =~ s/\W+//s; - + ~COMPARATOR~ @@ -240,7 +240,7 @@ || ($x cmp $y) || ($a cmp $b) ; - + DEBUG > 1 and print " <$a> cmp <$b> is $rv\n"; $rv; } @@ -391,7 +391,7 @@ map { [$_, make_a_sort_key_from($_) ] @_ ; - + ...you wight want something that replaces not C, but C. That's what Sort::Naturally's C function is for. Call it with the syntax C instead of C<$left cmp $right>, @@ -503,11 +503,11 @@ sub nsort { my($cmp, $lc); return @_ if @_ < 2; # Just to be CLEVER. - + my($x, $i); # scratch vars - + # And now, the GREAT BIG Schwartzian transform: - + map $_->[0], @@ -542,7 +542,7 @@ map { my @bit = ($x = defined($_) ? $_ : ''); - + if($x =~ m/^[+-]?(?=\d|\.\d)\d*(?:\.\d*)?(?:[Ee](?:[+-]?\d+))?\z/s) { # It's entirely purely numeric, so treat it specially: push @bit, '', $x; @@ -565,7 +565,7 @@ # ['foo32.pl' => 'foo', 32, , '.pl', 0 ] # ['foo325.pl' => 'foo', 325, , '.pl', 0 ] # Yes, always an ODD number of elements. - + \@bit; } @_; @@ -576,11 +576,11 @@ sub nsorts { return @_ if @_ < 2; # Just to be CLEVER. - + my($x, $i); # scratch vars - + # And now, the GREAT BIG Schwartzian transform: - + map $_->[0], @@ -615,7 +615,7 @@ map { my @bit = ($x = defined($_) ? $_ : ''); - + while(length $x) { push @bit, ($x =~ s/^(\D+)//s) ? lc($1) : ''; push @bit, ($x =~ s/^(\d+)//s) ? $1 : 0; @@ -632,7 +632,7 @@ # ['foo32.pl' => 'foo', 32, , '.pl', 0 ] # ['foo325.pl' => 'foo', 325, , '.pl', 0 ] # Yes, always an ODD number of elements. - + \@bit; } @_; @@ -643,11 +643,11 @@ sub nsort0 { return @_ if @_ < 2; # Just to be CLEVER. - + my($x, $i); # scratch vars - + # And now, the GREAT BIG Schwartzian transform: - + map $_->[0], @@ -682,7 +682,7 @@ map { my @bit = ($x = defined($_) ? $_ : ''); - + if($x =~ m/^[+-]?(?=\d|\.\d)\d*(?:\.\d*)?(?:[Ee](?:[+-]?\d+))?\z/s) { # It's entirely purely numeric, so treat it specially: push @bit, '', $x; @@ -703,7 +703,7 @@ } } DEBUG and print "$bit[0] => ", map("{$_} ", @bit), "\n"; - + \@bit; } @_; @@ -715,11 +715,11 @@ sub nsortf { return @_ if @_ < 2; # Just to be CLEVER. - + my($x, $i); # scratch vars - + # And now, the GREAT BIG Schwartzian transform: - + map $_->[0], @@ -749,20 +749,20 @@ $x || (@$a <=> @$b ) || ($a->[1] cmp $b->[1]) || ($a->[2] <=> $b->[2]) || ($a->[0] cmp $b->[0]); # unless we found a result for $x in the while loop, - # use length as a tiebreaker, otherwise use the + # use length as a tiebreaker, otherwise use the # lc'd extension, otherwise the verison, otherwise use # the original string as a fallback tiebreaker. } map { my @bit = ( ($x = defined($_) ? $_ : ''), '',0 ); - + { # Consume the string. - + # First, pull off any VAX-style version $bit[2] = $1 if $x =~ s/;(\d+)$//; - + # Then pull off any apparent extension if( $x !~ m/^\.+$/s and # don't mangle ".", "..", or "..." $x =~ s/(\.[^\.\;]*)$//sg @@ -800,9 +800,9 @@ } } } - + DEBUG and print "$bit[0] => ", map("{$_} ", @bit), "\n"; - + \@bit; } @_; diff -Nru libsort-naturally-perl-1.02/Makefile.PL libsort-naturally-perl-1.03/Makefile.PL --- libsort-naturally-perl-1.02/Makefile.PL 2004-12-30 05:38:56.000000000 +0000 +++ libsort-naturally-perl-1.03/Makefile.PL 2012-04-11 08:43:05.000000000 +0000 @@ -9,9 +9,45 @@ use strict; use ExtUtils::MakeMaker; -WriteMakefile( - 'NAME' => 'Sort::Naturally', +WriteMakefile1( + LICENSE => 'perl', + MIN_PERL_VERSION => '5', + META_MERGE => { + resources => { + repository => 'https://github.com/bingos/sort-naturally', + }, + }, + #BUILD_REQUIRES => { + #}, + + 'AUTHOR' => 'Sean M. Burke ', + 'ABSTRACT' => 'sort lexically, but sort numeral parts numerically', + 'NAME' => 'Sort::Naturally', 'VERSION_FROM' => 'lib/Sort/Naturally.pm', # finds $VERSION 'dist' => { COMPRESS => 'gzip -6f', SUFFIX => 'gz', }, ); + +sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade. + my %params=@_; + my $eumm_version=$ExtUtils::MakeMaker::VERSION; + $eumm_version=eval $eumm_version; + die "EXTRA_META is deprecated" if exists $params{EXTRA_META}; + die "License not specified" if not exists $params{LICENSE}; + if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) { + #EUMM 6.5502 has problems with BUILD_REQUIRES + $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} }; + delete $params{BUILD_REQUIRES}; + } + delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52; + delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48; + delete $params{META_MERGE} if $eumm_version < 6.46; + delete $params{META_ADD} if $eumm_version < 6.46; + delete $params{LICENSE} if $eumm_version < 6.31; + delete $params{AUTHOR} if $] < 5.005; + delete $params{ABSTRACT_FROM} if $] < 5.005; + delete $params{BINARY_LOCATION} if $] < 5.005; + + WriteMakefile(%params); +} + diff -Nru libsort-naturally-perl-1.02/MANIFEST libsort-naturally-perl-1.03/MANIFEST --- libsort-naturally-perl-1.02/MANIFEST 2004-12-30 07:15:34.000000000 +0000 +++ libsort-naturally-perl-1.03/MANIFEST 2012-04-11 08:48:45.000000000 +0000 @@ -7,3 +7,4 @@ t/00_about_verbose.t t/01_old_junk.t META.yml Module meta-data (added by MakeMaker) +META.json Module JSON meta-data (added by MakeMaker) diff -Nru libsort-naturally-perl-1.02/MANIFEST.SKIP libsort-naturally-perl-1.03/MANIFEST.SKIP --- libsort-naturally-perl-1.02/MANIFEST.SKIP 2004-12-30 03:30:25.000000000 +0000 +++ libsort-naturally-perl-1.03/MANIFEST.SKIP 2012-04-11 08:36:16.000000000 +0000 @@ -4,4 +4,5 @@ CVS blib ~ - +.git +.bak$ diff -Nru libsort-naturally-perl-1.02/META.json libsort-naturally-perl-1.03/META.json --- libsort-naturally-perl-1.02/META.json 1970-01-01 00:00:00.000000000 +0000 +++ libsort-naturally-perl-1.03/META.json 2012-04-11 08:48:45.000000000 +0000 @@ -0,0 +1,46 @@ +{ + "abstract" : "sort lexically, but sort numeral parts numerically", + "author" : [ + "Sean M. Burke " + ], + "dynamic_config" : 1, + "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Sort-Naturally", + "no_index" : { + "directory" : [ + "t", + "inc" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "runtime" : { + "requires" : { + "perl" : "5" + } + } + }, + "release_status" : "stable", + "resources" : { + "repository" : { + "url" : "https://github.com/bingos/sort-naturally" + } + }, + "version" : "1.03" +} diff -Nru libsort-naturally-perl-1.02/META.yml libsort-naturally-perl-1.03/META.yml --- libsort-naturally-perl-1.02/META.yml 2004-12-30 07:15:40.000000000 +0000 +++ libsort-naturally-perl-1.03/META.yml 2012-04-11 08:48:44.000000000 +0000 @@ -1,10 +1,24 @@ -# http://module-build.sourceforge.net/META-spec.html -#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# -name: Sort-Naturally -version: 1.02 -version_from: lib/Sort/Naturally.pm -installdirs: site +--- +abstract: 'sort lexically, but sort numeral parts numerically' +author: + - 'Sean M. Burke ' +build_requires: + ExtUtils::MakeMaker: 0 +configure_requires: + ExtUtils::MakeMaker: 0 +dynamic_config: 1 +generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Sort-Naturally +no_index: + directory: + - t + - inc requires: - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.17 + perl: 5 +resources: + repository: https://github.com/bingos/sort-naturally +version: 1.03 diff -Nru libsort-naturally-perl-1.02/t/00_about_verbose.t libsort-naturally-perl-1.03/t/00_about_verbose.t --- libsort-naturally-perl-1.02/t/00_about_verbose.t 2004-12-30 05:53:16.000000000 +0000 +++ libsort-naturally-perl-1.03/t/00_about_verbose.t 2012-04-11 08:28:40.000000000 +0000 @@ -37,7 +37,7 @@ next if $this eq 'main'; # %main:: is %:: #print "Peeking at $this => ${$this . '::VERSION'}\n"; - + if(defined ${$this . '::VERSION'} ) { $v{$this} = ${$this . '::VERSION'} } elsif( @@ -51,7 +51,7 @@ # It's probably an unpopulated package. ## $v{$this} = '...'; } - + $pref = length($this) ? "$this\::" : ''; push @stack, map m/^(.+)::$/ ? "$pref$1" : (), keys %{$this . '::'}; #print "Stack: @stack\n"; diff -Nru libsort-naturally-perl-1.02/t/01_old_junk.t libsort-naturally-perl-1.03/t/01_old_junk.t --- libsort-naturally-perl-1.02/t/01_old_junk.t 2004-12-30 03:29:18.000000000 +0000 +++ libsort-naturally-perl-1.03/t/01_old_junk.t 2012-04-11 08:28:40.000000000 +0000 @@ -30,19 +30,19 @@ foo12a foo12z foo13a foo 14 9x foo12 fooa foolio Foolio Foo12a ) ; - + print "#\n# In: <@x>\n"; print "# nsort ...\n"; my @y = nsort(map $_, @x); print "# ncmp ...\n"; my @z = sort {&ncmp($a,$b)} - # map $_, + # map $_, @x ; #print "OK, <@x> => <@y>\n"; - print( + print( "@y" eq "@z" - ? scalar(ok(1), "# Good, eq") : scalar(ok(0), "# Feh, NE!\n< <@x>"), + ? scalar(ok(1), "# Good, eq") : scalar(ok(0), "# Feh, NE!\n< <@x>"), "\n# <@y>\n# :<@z>\n" ); if("@y" eq $ok1) {