Hello community, here is the log from the commit of package perl-Clone for openSUSE:Factory checked in at 2015-04-25 21:16:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Clone (Old) and /work/SRC/openSUSE:Factory/.perl-Clone.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Clone" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Clone/perl-Clone.changes 2013-12-12 11:19:08.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Clone.new/perl-Clone.changes 2015-04-25 21:16:05.000000000 +0200 @@ -1,0 +2,15 @@ +Thu Apr 16 17:27:41 UTC 2015 - [email protected] + +- updated to 0.38 + see /usr/share/doc/packages/perl-Clone/Changes + + 0.38 2015-01-18 19:27:41 garu + - typo fixes and improvements to the README (zmughal) + - travis/coveralls integration (zmughal) + + 0.37 2014-05-15 16:45:33 garu + - removed Carp dependency (GARU) + - silenced some clang warnings (JACQUESG) + - added a README (GARU) + +------------------------------------------------------------------- Old: ---- Clone-0.36.tar.gz New: ---- Clone-0.38.tar.gz cpanspec.yml ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Clone.spec ++++++ --- /var/tmp/diff_new_pack.0Qnh9q/_old 2015-04-25 21:16:06.000000000 +0200 +++ /var/tmp/diff_new_pack.0Qnh9q/_new 2015-04-25 21:16:06.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Clone # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,28 +17,27 @@ Name: perl-Clone -Version: 0.36 +Version: 0.38 Release: 0 %define cpan_name Clone -Summary: recursively copy Perl datatypes +Summary: Recursively Copy Perl Datatypes License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Clone/ -Source: http://www.cpan.org/authors/id/G/GA/GARU/%{cpan_name}-%{version}.tar.gz +Source0: http://www.cpan.org/authors/id/G/GA/GARU/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -#BuildRequires: perl(Clone) -#BuildRequires: perl(Hash::Util::FieldHash) %{perl_requires} %description -This module provides a clone() method which makes recursive copies of +This module provides a 'clone()' method which makes recursive copies of nested hash, array, scalar and reference types, including tied variables and objects. -clone() takes a scalar argument and duplicates it. To duplicate lists, -arrays or hashes, pass them in by reference. e.g. +'clone()' takes a scalar argument and duplicates it. To duplicate lists, +arrays or hashes, pass them in by reference, e.g. my $copy = clone (\@array); @@ -64,6 +63,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc Changes +%doc Changes README %changelog ++++++ Clone-0.36.tar.gz -> Clone-0.38.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/Changes new/Clone-0.38/Changes --- old/Clone-0.36/Changes 2013-12-07 20:30:48.000000000 +0100 +++ new/Clone-0.38/Changes 2015-01-18 22:34:32.000000000 +0100 @@ -1,5 +1,14 @@ Revision history for Perl module Clone +0.38 2015-01-18 19:27:41 garu + - typo fixes and improvements to the README (zmughal) + - travis/coveralls integration (zmughal) + +0.37 2014-05-15 16:45:33 garu + - removed Carp dependency (GARU) + - silenced some clang warnings (JACQUESG) + - added a README (GARU) + 0.36 2013-12-07 17:36:04 garu - fixed compilation issue on AIX and C89 (GAAS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/Clone.pm new/Clone-0.38/Clone.pm --- old/Clone-0.36/Clone.pm 2013-12-07 20:33:27.000000000 +0100 +++ new/Clone-0.38/Clone.pm 2015-01-18 22:34:00.000000000 +0100 @@ -1,18 +1,17 @@ package Clone; use strict; -use Carp; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); require Exporter; require DynaLoader; require AutoLoader; -@ISA = qw(Exporter DynaLoader); -@EXPORT = qw(); +@ISA = qw(Exporter DynaLoader); +@EXPORT = qw(); @EXPORT_OK = qw( clone ); -$VERSION = '0.36'; +$VERSION = '0.38'; bootstrap Clone $VERSION; @@ -23,37 +22,49 @@ Clone - recursively copy Perl datatypes +=for html +<a href="https://travis-ci.org/garu/Clone"><img src="https://travis-ci.org/garu/Clone.png?branch=master" alt="Build Status"></a> +<a href="https://coveralls.io/r/garu/Clone?branch=master"><img src="https://coveralls.io/repos/garu/Clone/badge.png?branch=master" alt="Coverage Status"></a> +<a href="https://metacpan.org/pod/Clone"><img src="https://badge.fury.io/pl/Clone.svg" alt="CPAN version"></a> + =head1 SYNOPSIS - package Foo; - use parent 'Clone'; + use Clone 'clone'; + + my $data = { + set => [ 1 .. 50 ], + foo => { + answer => 42, + object => SomeObject->new, + }, + }; + + my $cloned_data = clone($data); + + $cloned_data->{foo}{answer} = 1; + print $cloned_data->{foo}{answer}; # '1' + print $data->{foo}{answer}; # '42' + +You can also add it to your class: + + package Foo; + use parent 'Clone'; + sub new { bless {}, shift } + + package main; - package main; - my $original = Foo->new; - $copy = $original->clone; - - # or - - use Clone qw(clone); - - $a = { 'foo' => 'bar', 'move' => 'zig' }; - $b = [ 'alpha', 'beta', 'gamma', 'vlissides' ]; - $c = Foo->new; - - $d = clone($a); - $e = clone($b); - $f = clone($c); + my $obj = Foo->new; + my $copy = $obj->clone; =head1 DESCRIPTION -This module provides a clone() method which makes recursive -copies of nested hash, array, scalar and reference types, +This module provides a C<clone()> method which makes recursive +copies of nested hash, array, scalar and reference types, including tied variables and objects. +C<clone()> takes a scalar argument and duplicates it. To duplicate lists, +arrays or hashes, pass them in by reference, e.g. -clone() takes a scalar argument and duplicates it. To duplicate lists, -arrays or hashes, pass them in by reference. e.g. - my $copy = clone (\@array); # or @@ -62,15 +73,15 @@ =head1 SEE ALSO -L<Storable>'s dclone() is a flexible solution for cloning variables, +L<Storable>'s C<dclone()> is a flexible solution for cloning variables, albeit slower for average-sized data structures. Simple and naive benchmarks show that Clone is faster for data structures -with 3 or less levels, while dclone() can be faster for structures +with 3 or fewer levels, while C<dclone()> can be faster for structures 4 or more levels deep. =head1 COPYRIGHT -Copyright 2001-2013 Ray Finch. All Rights Reserved. +Copyright 2001-2015 Ray Finch. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/Clone.xs new/Clone-0.38/Clone.xs --- old/Clone-0.36/Clone.xs 2013-12-07 19:55:17.000000000 +0100 +++ new/Clone-0.38/Clone.xs 2014-05-10 15:35:11.000000000 +0200 @@ -45,7 +45,7 @@ TRACEME(("ref = 0x%x(%d)\n", ref, SvREFCNT(ref))); hv_iterinit (self); - while (next = hv_iternext (self)) + while ((next = hv_iternext (self))) { SV *key = hv_iterkeysv (next); TRACEME(("clone item %s\n", SvPV_nolen(key) )); @@ -278,7 +278,7 @@ mg->mg_len); } /* major kludge - why does the vtable for a qr type need to be null? */ - if ( mg = mg_find(clone, 'r') ) + if ( (mg = mg_find(clone, 'r')) ) mg->mg_virtual = (MGVTBL *) NULL; } /* 2: HASH/ARRAY - (with 'internal' elements) */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/MANIFEST new/Clone-0.38/MANIFEST --- old/Clone-0.36/MANIFEST 2013-12-07 20:35:51.000000000 +0100 +++ new/Clone-0.38/MANIFEST 2015-01-18 22:36:02.000000000 +0100 @@ -4,6 +4,7 @@ Makefile.PL MANIFEST META.yml Module meta-data (added by MakeMaker) +README t/01array.t t/02hash.t t/03scalar.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/META.json new/Clone-0.38/META.json --- old/Clone-0.36/META.json 2013-12-07 20:35:51.000000000 +0100 +++ new/Clone-0.38/META.json 2015-01-18 22:36:01.000000000 +0100 @@ -4,7 +4,7 @@ "Ray Finch <[email protected]>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921", + "generated_by" : "ExtUtils::MakeMaker version 7.02, CPAN::Meta::Converter version 2.142690", "license" : [ "perl_5" ], @@ -46,5 +46,5 @@ "url" : "http://github.com/garu/Clone" } }, - "version" : "0.36" + "version" : "0.38" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/META.yml new/Clone-0.38/META.yml --- old/Clone-0.36/META.yml 2013-12-07 20:35:51.000000000 +0100 +++ new/Clone-0.38/META.yml 2015-01-18 22:36:01.000000000 +0100 @@ -3,15 +3,15 @@ author: - 'Ray Finch <[email protected]>' build_requires: - Test::More: 0 + Test::More: '0' configure_requires: - ExtUtils::MakeMaker: 0 + ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921' +generated_by: 'ExtUtils::MakeMaker version 7.02, CPAN::Meta::Converter version 2.142690' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: Clone no_index: directory: @@ -22,4 +22,4 @@ bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Clone license: http://dev.perl.org/licenses/ repository: http://github.com/garu/Clone -version: 0.36 +version: '0.38' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/Makefile.PL new/Clone-0.38/Makefile.PL --- old/Clone-0.36/Makefile.PL 2013-12-07 19:51:01.000000000 +0100 +++ new/Clone-0.38/Makefile.PL 2014-05-10 15:36:17.000000000 +0200 @@ -8,7 +8,7 @@ 'LICENSE' => 'perl', 'PL_FILES' => {}, 'BUILD_REQUIRES' => { - 'Test::More' => 0, + 'Test::More' => 0, }, 'LIBS' => [''], # e.g., '-lm' 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/README new/Clone-0.38/README --- old/Clone-0.36/README 1970-01-01 01:00:00.000000000 +0100 +++ new/Clone-0.38/README 2015-01-18 22:32:56.000000000 +0100 @@ -0,0 +1,78 @@ +Clone - recursively copy Perl datatypes +======================================= + +[](https://travis-ci.org/garu/Clone) +[](https://coveralls.io/r/garu/Clone?branch=master) +[](https://metacpan.org/pod/Clone) + +This module provides a `clone()` method which makes recursive +copies of nested hash, array, scalar and reference types, +including tied variables and objects. + +```perl + use Clone 'clone'; + + my $data = { + set => [ 1 .. 50 ], + foo => { + answer => 42, + object => SomeObject->new, + }, + }; + + my $cloned_data = clone($data); + + $cloned_data->{foo}{answer} = 1; + print $cloned_data->{foo}{answer}; # '1' + print $data->{foo}{answer}; # '42' +``` + +You can also add it to your class: + +```perl + package Foo; + use parent 'Clone'; + sub new { bless {}, shift } + + package main; + + my $obj = Foo->new; + my $copy = $obj->clone; +``` + +`clone()` takes a scalar argument and duplicates it. To duplicate lists, +arrays or hashes, pass them in by reference, e.g. + +```perl + my $copy = clone (\@array); + + # or + + my %copy = %{ clone (\%hash) }; +``` + +See Also +-------- + +[Storable](https://metacpan.org/pod/Storable)'s `dclone()` is a flexible solution for cloning variables, +albeit slower for average-sized data structures. Simple +and naive benchmarks show that Clone is faster for data structures +with 3 or fewer levels, while `dclone()` can be faster for structures +4 or more levels deep. + +COPYRIGHT +--------- + +Copyright 2001-2015 Ray Finch. All Rights Reserved. + +This module is free software; you can redistribute it and/or +modify it under the same terms as Perl itself. + +AUTHOR +------ + +Ray Finch `<[email protected]>` + +Breno G. de Oliveira `<[email protected]>` and +Florian Ragwitz `<[email protected]>` perform routine maintenance +releases since 2012. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Clone-0.36/t/dump.pl new/Clone-0.38/t/dump.pl --- old/Clone-0.36/t/dump.pl 2013-12-07 19:51:01.000000000 +0100 +++ new/Clone-0.38/t/dump.pl 2014-05-15 23:43:24.000000000 +0200 @@ -17,7 +17,6 @@ } package dump; -use Carp; %dump = ( 'SCALAR' => 'dump_scalar', @@ -30,7 +29,7 @@ # Given an object, dump its transitive data closure sub main'dump { my ($object) = @_; - croak "Not a reference!" unless ref($object); + die "Not a reference!" unless ref($object); local %dumped; local %object; local $count = 0; @@ -78,7 +77,7 @@ # If the referenced was blessed, we bless it once the object is dumped. # The retrieval code will perform the same on the last object retrieved. - croak "Unknown simple type '$ref'" unless defined $dump{$ref}; + die "Unknown simple type '$ref'" unless defined $dump{$ref}; &{$dump{$ref}}($object); # Dump object &bless($bless) if $bless; # Mark it as blessed, if necessary ++++++ cpanspec.yml ++++++ --- #description_paragraphs: 3 #no_testing: broken upstream #sources: # - source1 # - source2 #patches: # foo.patch: -p1 # bar.patch: #preamble: |- # BuildRequires: gcc-c++ #post_prep: |- # hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` # sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL #post_install: |- # sed on %{name}.files #license: SUSE-NonFree #skip_noarch: 1 #custom_build: - #./Build build flags=%{?_smp_mflags} --myflag
