Hello community, here is the log from the commit of package perl-Tie-IxHash for openSUSE:Factory checked in at 2013-06-06 15:06:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Tie-IxHash (Old) and /work/SRC/openSUSE:Factory/.perl-Tie-IxHash.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Tie-IxHash" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Tie-IxHash/perl-Tie-IxHash.changes 2013-03-01 08:03:57.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Tie-IxHash.new/perl-Tie-IxHash.changes 2013-06-06 15:06:24.000000000 +0200 @@ -1,0 +2,7 @@ +Tue Jun 4 15:22:47 UTC 2013 - [email protected] + +- updated to 1.23 + New method Clear() + Deleting current element when doing cycle using each will work (test by OLEG, RT#82248) + +------------------------------------------------------------------- Old: ---- Tie-IxHash-1.22.tar.gz New: ---- Tie-IxHash-1.23.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Tie-IxHash.spec ++++++ --- /var/tmp/diff_new_pack.vtJavO/_old 2013-06-06 15:06:25.000000000 +0200 +++ /var/tmp/diff_new_pack.vtJavO/_new 2013-06-06 15:06:25.000000000 +0200 @@ -17,49 +17,45 @@ Name: perl-Tie-IxHash -Provides: perl_tie -Obsoletes: perl_tie -Summary: TieIxHash Perl Module -License: Artistic-1.0 or GPL-2.0+ -Group: Development/Libraries/Perl -Version: 1.22 +Version: 1.23 Release: 0 -Source: Tie-IxHash-%{version}.tar.gz +%define cpan_name Tie-IxHash +Summary: ordered associative arrays for Perl +License: Artistic-1.0 or GPL-1.0+ +Group: Development/Libraries/Perl +Url: http://search.cpan.org/dist/Tie-IxHash/ +Source: http://www.cpan.org/authors/id/C/CH/CHORNY/%{cpan_name}-%{version}.tar.gz +BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} BuildRequires: perl BuildRequires: perl-macros +BuildRequires: perl(Module::Build) +#BuildRequires: perl(Tie::IxHash) +%{perl_requires} %description -If you have been led to believe that associative arrays in Perl do not -preserve order, and if you have ever craved that feature, this module -is for you. - - +This Perl module implements Perl hashes that preserve the order in which +the hash elements were added. The order is not affected when values +corresponding to existing keys in the IxHash are changed. The elements can +also be set to any arbitrary supplied order. The familiar perl array +operations can also be performed on the IxHash. %prep -%setup -n Tie-IxHash-%{version} -q +%setup -q -n %{cpan_name}-%{version} %build -perl Makefile.PL -make %{?_smp_mflags} +%{__perl} Build.PL installdirs=vendor +./Build build flags=%{?_smp_mflags} %check -make test +./Build test %install -install -d $RPM_BUILD_ROOT/var/adm/perl-modules -make DESTDIR=$RPM_BUILD_ROOT install_vendor -%perl_process_packlist - -%files -%defattr(-,root,root) -%doc README MANIFEST Changes -%doc %{_mandir}/man?/* -%{perl_vendorarch}/auto/Tie -%{perl_vendorlib}/Tie +./Build install destdir=%{buildroot} create_packlist=0 +%perl_gen_filelist -%clean -rm -rf $RPM_BUILD_ROOT +%files -f %{name}.files +%defattr(-,root,root,755) +%doc Changes README %changelog ++++++ Tie-IxHash-1.22.tar.gz -> Tie-IxHash-1.23.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/Build.PL new/Tie-IxHash-1.23/Build.PL --- old/Tie-IxHash-1.22/Build.PL 2010-02-27 12:46:12.000000000 +0100 +++ new/Tie-IxHash-1.23/Build.PL 2013-02-24 11:59:29.000000000 +0100 @@ -6,7 +6,10 @@ 'auto_configure_requires' => 0, 'module_name' => 'Tie::IxHash', 'requires' => { - 'perl' => '5.003' + 'perl' => '5.005', + }, + 'build_requires' => { + 'Test::More' => 0, }, 'meta_merge' => { 'resources' => { @@ -14,7 +17,7 @@ } }, 'license' => 'perl', - 'dist_version_from' => 'lib/Tie/IxHash.pm' + 'dist_version_from' => 'lib/Tie/IxHash.pm', ); $build->create_build_script(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/Changes new/Tie-IxHash-1.23/Changes --- old/Tie-IxHash-1.22/Changes 2010-02-27 01:07:16.000000000 +0100 +++ new/Tie-IxHash-1.23/Changes 2013-02-24 12:16:31.000000000 +0100 @@ -6,6 +6,12 @@ =over 8 +=item 1.23 (24 February 2013) + +New method Clear() + +Deleting current element when doing cycle using each will work (test by OLEG, RT#82248) + =item 1.22 (27 February 2010) Build.PL added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/MANIFEST new/Tie-IxHash-1.23/MANIFEST --- old/Tie-IxHash-1.22/MANIFEST 2010-02-27 01:08:38.000000000 +0100 +++ new/Tie-IxHash-1.23/MANIFEST 2013-02-24 12:03:44.000000000 +0100 @@ -5,5 +5,7 @@ Build.PL lib/Tie/IxHash.pm t/ixhash.t +t/each-delete.t t/pod.t META.yml +META.json diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/META.json new/Tie-IxHash-1.23/META.json --- old/Tie-IxHash-1.22/META.json 1970-01-01 01:00:00.000000000 +0100 +++ new/Tie-IxHash-1.23/META.json 2013-02-24 12:35:41.000000000 +0100 @@ -0,0 +1,44 @@ +{ + "abstract" : "ordered associative arrays for Perl", + "author" : [ + "Gurusamy Sarathy [email protected]" + ], + "dynamic_config" : 1, + "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter version 2.112621", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Tie-IxHash", + "prereqs" : { + "build" : { + "requires" : { + "Test::More" : 0 + } + }, + "runtime" : { + "requires" : { + "perl" : "5.005" + } + } + }, + "provides" : { + "Tie::IxHash" : { + "file" : "lib/Tie/IxHash.pm", + "version" : "1.23" + } + }, + "release_status" : "stable", + "resources" : { + "license" : [ + "http://dev.perl.org/licenses/" + ], + "repository" : { + "url" : "git://github.com/chorny/Tie-IxHash.git" + } + }, + "version" : "1.23" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/META.yml new/Tie-IxHash-1.23/META.yml --- old/Tie-IxHash-1.22/META.yml 2010-02-27 21:09:10.000000000 +0100 +++ new/Tie-IxHash-1.23/META.yml 2013-02-24 12:35:41.000000000 +0100 @@ -1,8 +1,11 @@ --- -abstract: 'ordered associative arrays for Perl' +abstract: ordered associative arrays for Perl author: - - 'Gurusamy Sarathy [email protected]' -generated_by: 'Module::Build version 0.3603' + - Gurusamy Sarathy [email protected] +build_requires: + Test::More: 0 +dynamic_config: 1 +generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 2.112621' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -11,10 +14,10 @@ provides: Tie::IxHash: file: lib/Tie/IxHash.pm - version: 1.22 + version: 1.23 requires: - perl: 5.003 + perl: 5.005 resources: license: http://dev.perl.org/licenses/ repository: git://github.com/chorny/Tie-IxHash.git -version: 1.22 +version: 1.23 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/Makefile.PL new/Tie-IxHash-1.23/Makefile.PL --- old/Tie-IxHash-1.22/Makefile.PL 2010-02-19 23:53:29.000000000 +0100 +++ new/Tie-IxHash-1.23/Makefile.PL 2013-02-23 17:36:30.000000000 +0100 @@ -3,12 +3,13 @@ NAME => "Tie::IxHash", VERSION_FROM => 'lib/Tie/IxHash.pm', LICENSE => 'perl', - MIN_PERL_VERSION => '5.003', + MIN_PERL_VERSION => '5.005', META_MERGE => { resources => { repository => 'git://github.com/chorny/Tie-IxHash.git', }, }, + PL_FILES => {}, #SKIP => [qw(static dynamic)], #'linkext' => {LINKTYPE => '' }, #'dist' => {COMPRESS=>'gzip -9f', SUFFIX => 'gz'}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/README new/Tie-IxHash-1.23/README --- old/Tie-IxHash-1.22/README 2010-01-29 17:17:52.000000000 +0100 +++ new/Tie-IxHash-1.23/README 2013-02-24 12:34:41.000000000 +0100 @@ -2,7 +2,7 @@ implements ordered in-memory associative arrays. It requires: - Perl Version 5.003 or later. + Perl Version 5.005 or later. If you have been led to believe that associative arrays in perl don't preserve order, and if you have ever craved for that feature, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/lib/Tie/IxHash.pm new/Tie-IxHash-1.23/lib/Tie/IxHash.pm --- old/Tie-IxHash-1.22/lib/Tie/IxHash.pm 2010-02-27 21:05:20.000000000 +0100 +++ new/Tie-IxHash-1.23/lib/Tie/IxHash.pm 2013-02-24 12:16:13.000000000 +0100 @@ -6,7 +6,7 @@ # See below for documentation. # -require 5.003; +require 5.005; package Tie::IxHash; use strict; @@ -15,7 +15,7 @@ use vars qw/@ISA $VERSION/; @ISA = qw(Tie::Hash); -$VERSION = $VERSION = '1.22'; +$VERSION = $VERSION = '1.23'; # # standard tie functions @@ -65,7 +65,10 @@ if (exists $s->[0]{$k}) { my($i) = $s->[0]{$k}; for ($i+1..$#{$s->[1]}) { # reset higher elt indexes - $s->[0]{$s->[1][$_]}--; # timeconsuming, is there is better way? + $s->[0]{ $s->[1][$_] }--; # timeconsuming, is there is better way? + } + if ( $i == $s->[3]-1 ) { + $s->[3]--; } delete $s->[0]{$k}; splice @{$s->[1]}, $i, 1; @@ -84,7 +87,7 @@ } sub NEXTKEY { - return $_[0][1][$_[0][3]++] if ($_[0][3] <= $#{$_[0][1]}); + return $_[0][1][ $_[0][3]++ ] if ($_[0][3] <= $#{ $_[0][1] } ); return undef; } @@ -98,6 +101,15 @@ sub new { TIEHASH(@_) } +sub Clear { + my $s = shift; + $s->[0] = {}; # hashkey index + $s->[1] = []; # array of keys + $s->[2] = []; # array of data + $s->[3] = 0; # iter count + return; +} + # # add pairs to end of indexed hash # note that if a supplied key exists, it will not be reordered @@ -434,7 +446,7 @@ # simple usage use Tie::IxHash; - tie HASHVARIABLE, Tie::IxHash [, LIST]; + tie HASHVARIABLE, 'Tie::IxHash' [, LIST]; # OO interface with more powerful features use Tie::IxHash; @@ -555,6 +567,10 @@ Reorders the IxHash elements by textual comparison of the values. +=item Clear + +Resets the IxHash to its pristine state: with no elements at all. + =back @@ -563,7 +579,7 @@ use Tie::IxHash; # simple interface - $t = tie(%myhash, Tie::IxHash, 'a' => 1, 'b' => 2); + $t = tie(%myhash, 'Tie::IxHash', 'a' => 1, 'b' => 2); %myhash = (first => 1, second => 2, third => 3); $myhash{fourth} = 4; @keys = keys %myhash; @@ -597,6 +613,9 @@ You cannot specify a negative length to C<Splice>. Negative indexes are OK, though. + +=head1 NOTE + Indexing always begins at 0 (despite the current C<$[> setting) for all the functions. @@ -622,7 +641,7 @@ =head1 VERSION -Version 1.22 27 February 2010 +Version 1.23 =head1 SEE ALSO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/t/each-delete.t new/Tie-IxHash-1.23/t/each-delete.t --- old/Tie-IxHash-1.22/t/each-delete.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Tie-IxHash-1.23/t/each-delete.t 2013-02-24 11:58:59.000000000 +0100 @@ -0,0 +1,15 @@ + +use strict; +use Test::More tests=>2; +use Tie::IxHash; + +my $o = tie my %h, 'Tie::IxHash'; + +$h{a} = 1; $h{b} = 2; $h{c} = 3; $h{d} = 4; $h{e} = 5; + +while (my ($k) = each %h) { + if ($k =~ /b|d|e/) { delete $h{$k}; } +} + +is(scalar(keys(%h)), 2) or diag explain(\%h); +is(join(',',keys(%h)), 'a,c') or diag explain(\%h); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Tie-IxHash-1.22/t/ixhash.t new/Tie-IxHash-1.23/t/ixhash.t --- old/Tie-IxHash-1.22/t/ixhash.t 2010-01-29 17:17:52.000000000 +0100 +++ new/Tie-IxHash-1.23/t/ixhash.t 2013-02-23 17:33:07.000000000 +0100 @@ -2,7 +2,7 @@ use Tie::IxHash; my $TNUM = 0; -print "1..25\n"; +print "1..26\n"; sub T { print $_[0] ? "ok " : "not ok ", ++$TNUM, "\n" } my %bar; @@ -55,3 +55,6 @@ $ixh->Splice($ixh->Length,0,$ixh->Pop); T 'z|7|o|2' eq join '|', %bar; +$ixh->Clear; +T $ixh->Length == 0; + -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
