Hello community, here is the log from the commit of package perl-Package-Variant for openSUSE:Factory checked in at 2015-04-15 16:26:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Package-Variant (Old) and /work/SRC/openSUSE:Factory/.perl-Package-Variant.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Package-Variant" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Package-Variant/perl-Package-Variant.changes 2014-03-18 14:16:31.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Package-Variant.new/perl-Package-Variant.changes 2015-04-15 16:26:30.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Apr 14 19:25:39 UTC 2015 - co...@suse.com + +- updated to 1.002002 + see /usr/share/doc/packages/perl-Package-Variant/Changes + +------------------------------------------------------------------- Old: ---- Package-Variant-1.002000.tar.gz New: ---- Package-Variant-1.002002.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Package-Variant.spec ++++++ --- /var/tmp/diff_new_pack.TIkAq7/_old 2015-04-15 16:26:30.000000000 +0200 +++ /var/tmp/diff_new_pack.TIkAq7/_new 2015-04-15 16:26:30.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Package-Variant # -# Copyright (c) 2014 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,7 +17,7 @@ Name: perl-Package-Variant -Version: 1.002000 +Version: 1.002002 Release: 0 %define cpan_name Package-Variant Summary: Parameterizable packages @@ -39,12 +39,16 @@ %{perl_requires} %description -This module allows you to build packages that return different variations -depending on what parameters are given. +This module allows you to build a variable package that contains a package +template and can use it to build variant packages at runtime. -Users of your package will receive a subroutine able to take parameters and -return the name of a suitable variant package. The implementation does not -care about what kind of package it builds. +Your variable package will export a subroutine which will build a variant +package, combining its arguments with the template, and return the name of +the new variant package. + +The implementation does not care about what kind of packages it builds, be +they simple function exporters, classes, singletons or something entirely +different. %prep %setup -q -n %{cpan_name}-%{version} ++++++ Package-Variant-1.002000.tar.gz -> Package-Variant-1.002002.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Package-Variant-1.002000/Changes new/Package-Variant-1.002002/Changes --- old/Package-Variant-1.002000/Changes 2013-12-10 20:45:21.000000000 +0100 +++ new/Package-Variant-1.002002/Changes 2014-08-21 19:03:41.000000000 +0200 @@ -1,27 +1,34 @@ Revision history for Package-Variant -1.002000 2013-12-10 +1.002002 - 2014-08-21 + - fix license in metadata + +1.002001 - 2014-08-16 + - specify perl prerequisite on metadata + - documentation fixes and clarifications + +1.002000 - 2013-12-10 - add build_variant method on variable packages, to allow avoiding importing a generator sub - fix pragmas applied by modules listed in "importing" from leaking out into unexpected scopes -1.001004 2013-05-04 +1.001004 - 2013-05-04 - fix documentation of "build_variant_of" method (RT#84554 -- thanks, Scott Miller!) -1.001003 2013-03-25 +1.001003 - 2013-03-25 - fix NAME in Makefile.PL (RT#84209) -1.001002 2012-09-19 +1.001002 - 2012-09-19 - Declare the Test::Fatal build dependency -1.001001 2012-05-12 +1.001001 - 2012-05-12 - Actually declare the Import::Into dependency (stupid mst) -1.001000 2012-05-12 +1.001000 - 2012-05-12 - Switch to Import::Into for exporting other things - Use Sub::Name to name installed things if available -1.000000 2012-01-23 +1.000000 - 2012-01-23 - initial release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Package-Variant-1.002000/META.json new/Package-Variant-1.002002/META.json --- old/Package-Variant-1.002000/META.json 2013-12-10 20:48:16.000000000 +0100 +++ new/Package-Variant-1.002002/META.json 2014-08-21 19:04:02.000000000 +0200 @@ -4,7 +4,7 @@ "mst - Matt S. Trout (cpan:MSTROUT) <m...@shadowcat.co.uk>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter version 2.132830", + "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520", "license" : [ "perl_5" ], @@ -16,25 +16,28 @@ "no_index" : { "directory" : [ "t", - "inc" + "xt" ], "package" : [ "string" ] }, "prereqs" : { - "build" : { - "requires" : { - "Test::Fatal" : "0" - } - }, + "build" : {}, + "configure" : {}, "runtime" : { "requires" : { "Carp" : "0", "Import::Into" : "1", "Module::Runtime" : "0.013", + "perl" : "5.006", "strictures" : "1" } + }, + "test" : { + "requires" : { + "Test::Fatal" : "0" + } } }, "release_status" : "stable", @@ -49,5 +52,5 @@ "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Package-Variant.git" } }, - "version" : "1.002000" + "version" : "1.002002" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Package-Variant-1.002000/META.yml new/Package-Variant-1.002002/META.yml --- old/Package-Variant-1.002000/META.yml 2013-12-10 20:48:16.000000000 +0100 +++ new/Package-Variant-1.002002/META.yml 2014-08-21 19:04:02.000000000 +0200 @@ -3,26 +3,27 @@ author: - 'mst - Matt S. Trout (cpan:MSTROUT) <m...@shadowcat.co.uk>' build_requires: - Test::Fatal: 0 + Test::Fatal: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter version 2.132830' +generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: Package-Variant no_index: directory: - t - - inc + - xt package: - string requires: - Carp: 0 - Import::Into: 1 - Module::Runtime: 0.013 - strictures: 1 + Carp: '0' + Import::Into: '1' + Module::Runtime: '0.013' + perl: '5.006' + strictures: '1' resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Variant repository: git://git.shadowcat.co.uk/p5sagit/Package-Variant.git -version: 1.002000 +version: '1.002002' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Package-Variant-1.002000/Makefile.PL new/Package-Variant-1.002002/Makefile.PL --- old/Package-Variant-1.002000/Makefile.PL 2013-12-04 13:32:48.000000000 +0100 +++ new/Package-Variant-1.002002/Makefile.PL 2014-08-19 14:52:52.000000000 +0200 @@ -1,39 +1,77 @@ use strict; use warnings FATAL => 'all'; -use ExtUtils::MakeMaker; -(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; - -WriteMakefile( - NAME => 'Package::Variant', - VERSION_FROM => 'lib/Package/Variant.pm', - CONFIGURE_REQUIRES => { - 'ExtUtils::MakeMaker' => '6.55_01', # for BUILD_REQUIRES +my %META = ( + name => 'Package-Variant', + prereqs => { + test => { requires => { + 'Test::Fatal' => 0, + }, }, + runtime => { requires => { + 'perl' => 5.006, + 'strictures' => 1, + 'Carp' => 0, + 'Import::Into' => 1, + 'Module::Runtime' => '0.013', + }, }, }, - BUILD_REQUIRES => { 'Test::Fatal' => 0 }, - PREREQ_PM => { - strictures => 1, - Carp => 0, - 'Import::Into' => 1, - 'Module::Runtime' => '0.013', - }, - - META_MERGE => { - 'meta-spec' => { version => 2 }, - dynamic_config => 0, - - resources => { - # r/w: p5sa...@git.shadowcat.co.uk:Package-Variant.git - repository => { - url => 'git://git.shadowcat.co.uk/p5sagit/Package-Variant.git', - web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Package-Variant.git', - type => 'git', - }, - bugtracker => { - mailto => 'bug-package-vari...@rt.cpan.org', - web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Variant', - }, + dynamic_config => 0, + resources => { + # r/w: p5sa...@git.shadowcat.co.uk:Package-Variant.git + repository => { + url => 'git://git.shadowcat.co.uk/p5sagit/Package-Variant.git', + web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Package-Variant.git', + type => 'git', + }, + bugtracker => { + mailto => 'bug-package-vari...@rt.cpan.org', + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Variant', }, - no_index => { package => [ 'string' ] }, }, + no_index => { directory => [ 't', 'xt', ], package => [ 'string' ] }, ); + +my %MM_ARGS = (); + +## BOILERPLATE ############################################################### +require ExtUtils::MakeMaker; +(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; + +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; +my $mymeta = $eumm_version >= 6.57_02; +my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; + +($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; +($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; +$META{license} = [ $META{license} ] + if $META{license} && !ref $META{license}; +$MM_ARGS{LICENSE} = $META{license}[0] + if $META{license} && $eumm_version >= 6.30; +$MM_ARGS{NO_MYMETA} = 1 + if $mymeta_broken; +$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } + unless -f 'META.yml'; + +for (qw(configure build test runtime)) { + my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; + my $r = $MM_ARGS{$key} = { + %{$META{prereqs}{$_}{requires} || {}}, + %{delete $MM_ARGS{$key} || {}}, + }; + defined $r->{$_} or delete $r->{$_} for keys %$r; +} + +$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; + +delete $MM_ARGS{MIN_PERL_VERSION} + if $eumm_version < 6.47_01; +$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} + if $eumm_version < 6.63_03; +$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} + if $eumm_version < 6.55_01; +delete $MM_ARGS{CONFIGURE_REQUIRES} + if $eumm_version < 6.51_03; + +ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); +## END BOILERPLATE ########################################################### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Package-Variant-1.002000/README new/Package-Variant-1.002002/README --- old/Package-Variant-1.002000/README 2013-12-10 20:48:16.000000000 +0100 +++ new/Package-Variant-1.002002/README 2014-08-21 19:04:02.000000000 +0200 @@ -3,13 +3,13 @@ SYNOPSIS # declaring a variable Moo role - package My::Role::ObjectAttr; + package My::VariableRole::ObjectAttr; use strictures 1; use Package::Variant # what modules to 'use' importing => ['Moo::Role'], # proxied subroutines - subs => [ qw(has around before after with) ], + subs => [ qw(has around before after with) ]; sub make_variant { my ($class, $target_package, %arguments) = @_; @@ -27,7 +27,7 @@ package My::Class::WithObjectAttr; use strictures 1; use Moo; - use My::Role::ObjectAttr; + use My::VariableRole::ObjectAttr; with ObjectAttr(name => 'some_obj', class => 'Some::Class'); @@ -36,22 +36,28 @@ $obj->some_obj; # returns a Some::Class instance DESCRIPTION - This module allows you to build packages that return different - variations depending on what parameters are given. + This module allows you to build a variable package that contains a + package template and can use it to build variant packages at runtime. - Users of your package will receive a subroutine able to take parameters - and return the name of a suitable variant package. The implementation - does not care about what kind of package it builds. + Your variable package will export a subroutine which will build a + variant package, combining its arguments with the template, and return + the name of the new variant package. + + The implementation does not care about what kind of packages it builds, + be they simple function exporters, classes, singletons or something + entirely different. Declaring a variable package There are two important parts to creating a variable package. You first have to give "Package::Variant" some basic information about what kind - of package you want to provide, and how. The second part is implementing - a method receiving the user's arguments and generating your variants. + of variant packages you want to provide, and how. The second part is + implementing a method which builds the components of the variant + packages that use the user's arguments or cannot be provided with a + static import. - Setting up the environment for building variations + Setting up the environment for building variants When you "use Package::Variant", you pass along some arguments that - describe how you intend to build your variations. + describe how you intend to build your variants. use Package::Variant importing => { $package => \@import_arguments, ... }, @@ -60,14 +66,15 @@ The "importing" option needs to be a hash or array reference with package names to be "use"d as keys, and array references containing the import arguments as values. These packages will be imported into every - new variant, and need to set up every declarative subroutine you require - to build your variable package. The next option will allow you to use - these functions. See "importing" for more options. You can omit empty - import argument lists when passing an array reference. + new variant package, to provide static functionality of the variant + packages and to set up every declarative subroutine you require to build + variants package components. The next option will allow you to use these + functions. See "importing" for more options. You can omit empty import + argument lists when passing an array reference. The "subs" option is an array reference of subroutine names that are exported by the packages specified with "importing". These subroutines - will be proxied from your declaration package to the variant to be + will be proxied from your variable package to the variant to be generated. With "importing" initializing your package and "subs" declaring what @@ -75,15 +82,15 @@ "make_variant" method building your variants. Declaring a method to produce variants - Every time a user requests a new variant a method named "make_variant" + Every time a user requests a new variant, a method named "make_variant" will be called with the name of the target package and the arguments from the user. It can then use the proxied subroutines declared with "subs" to - customize the new package. An "install" subroutine is exported as well - allowing you to dynamically install methods into the new package. If - these options aren't flexible enough, you can use the passed name of the - new package to do any other kind of customizations. + customize the variant package. An "install" subroutine is exported as + well allowing you to dynamically install methods into the variant + package. If these options aren't flexible enough, you can use the passed + name of the variant package to do any other kind of customizations. sub make_variant { my ($class, $target, @arguments) = @_; @@ -93,25 +100,26 @@ } When the method is finished, the user will receive the name of the new - package variant you just set up. + variant package you just set up. Using variable packages After your variable package is created your users can get a variant - generating subroutine by simply importing your package. + generator subroutine by simply importing your package. use My::Variant; my $new_variant_package = Variant(@variant_arguments); + # the variant package is now fully initialized and used - The package is now fully initialized and used. You can import the - subroutine under a different name by specifying an "as" argument. + You can import the subroutine under a different name by specifying an + "as" argument. Dynamic creation of variant packages For regular uses, the normal import provides more than enough - flexibility. However, if you want to create variations of dynamically + flexibility. However, if you want to create variants of dynamically determined packages, you can use the "build_variant_of" method. - You can use this to create variations of other packages and pass - arguments on to them to allow more modular and extensible variations. + You can use this to create variants of other packages and pass arguments + on to them to allow more modular and extensible variants. OPTIONS These are the options that can be passed when importing @@ -125,7 +133,7 @@ importing This option is a hash reference mapping package names to array references containing import arguments. The packages will be imported - with the given arguments by every variation before the "make_variant" + with the given arguments by every variant before the "make_variant" method is asked to create the package (this is done using Import::Into). If import order is important to you, you can also pass the "importing" @@ -154,7 +162,7 @@ An array reference of strings listing the names of subroutines that should be proxied. These subroutines are expected to be installed into the new variant package by the modules imported with "importing". - Subroutines with the same name will be available in your declaration + Subroutines with the same name will be available in your variable package, and will proxy through to the newly created package when used within "make_variant". @@ -237,6 +245,8 @@ CONTRIBUTORS phaylon - Robert Sedlacek (cpan:PHAYLON) <r.sedla...@shadowcat.co.uk> + haarg - Graham Knop (cpan:HAARG) <ha...@haarg.org> + COPYRIGHT Copyright (c) 2010-2012 the "Package::Variant" "AUTHOR" and "CONTRIBUTORS" as listed above. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Package-Variant-1.002000/lib/Package/Variant.pm new/Package-Variant-1.002002/lib/Package/Variant.pm --- old/Package-Variant-1.002000/lib/Package/Variant.pm 2013-12-10 20:06:47.000000000 +0100 +++ new/Package-Variant-1.002002/lib/Package/Variant.pm 2014-08-21 19:03:01.000000000 +0200 @@ -5,7 +5,7 @@ use Module::Runtime qw(require_module); use Carp qw(croak); -our $VERSION = '1.002000'; # 1.2.0 +our $VERSION = '1.002002'; $VERSION = eval $VERSION; @@ -128,13 +128,13 @@ =head1 SYNOPSIS # declaring a variable Moo role - package My::Role::ObjectAttr; + package My::VariableRole::ObjectAttr; use strictures 1; use Package::Variant # what modules to 'use' importing => ['Moo::Role'], # proxied subroutines - subs => [ qw(has around before after with) ], + subs => [ qw(has around before after with) ]; sub make_variant { my ($class, $target_package, %arguments) = @_; @@ -152,7 +152,7 @@ package My::Class::WithObjectAttr; use strictures 1; use Moo; - use My::Role::ObjectAttr; + use My::VariableRole::ObjectAttr; with ObjectAttr(name => 'some_obj', class => 'Some::Class'); @@ -162,24 +162,28 @@ =head1 DESCRIPTION -This module allows you to build packages that return different variations -depending on what parameters are given. +This module allows you to build a variable package that contains a package +template and can use it to build variant packages at runtime. -Users of your package will receive a subroutine able to take parameters -and return the name of a suitable variant package. The implementation does -not care about what kind of package it builds. +Your variable package will export a subroutine which will build a variant +package, combining its arguments with the template, and return the name of the +new variant package. + +The implementation does not care about what kind of packages it builds, be they +simple function exporters, classes, singletons or something entirely different. =head2 Declaring a variable package There are two important parts to creating a variable package. You first have to give C<Package::Variant> some basic information about what kind of -package you want to provide, and how. The second part is implementing a -method receiving the user's arguments and generating your variants. +variant packages you want to provide, and how. The second part is implementing a +method which builds the components of the variant packages that use the user's +arguments or cannot be provided with a static import. -=head3 Setting up the environment for building variations +=head3 Setting up the environment for building variants When you C<use Package::Variant>, you pass along some arguments that -describe how you intend to build your variations. +describe how you intend to build your variants. use Package::Variant importing => { $package => \@import_arguments, ... }, @@ -188,14 +192,15 @@ The L</importing> option needs to be a hash or array reference with package names to be C<use>d as keys, and array references containing the import arguments as values. These packages will be imported into every new -variant, and need to set up every declarative subroutine you require to -build your variable package. The next option will allow you to use these -functions. See L</importing> for more options. You can omit empty import -argument lists when passing an array reference. +variant package, to provide static functionality of the variant packages and to +set up every declarative subroutine you require to build variants package +components. The next option will allow you to use these functions. See +L</importing> for more options. You can omit empty import argument lists when +passing an array reference. The L</subs> option is an array reference of subroutine names that are exported by the packages specified with L</importing>. These subroutines -will be proxied from your declaration package to the variant to be +will be proxied from your variable package to the variant to be generated. With L</importing> initializing your package and L</subs> declaring what @@ -204,14 +209,14 @@ =head3 Declaring a method to produce variants -Every time a user requests a new variant a method named L</make_variant> +Every time a user requests a new variant, a method named L</make_variant> will be called with the name of the target package and the arguments from the user. It can then use the proxied subroutines declared with L</subs> to -customize the new package. An L</install> subroutine is exported as well -allowing you to dynamically install methods into the new package. If these -options aren't flexible enough, you can use the passed name of the new +customize the variant package. An L</install> subroutine is exported as well +allowing you to dynamically install methods into the variant package. If these +options aren't flexible enough, you can use the passed name of the variant package to do any other kind of customizations. sub make_variant { @@ -221,30 +226,31 @@ # ... } -When the method is finished, the user will receive the name of the new -package variant you just set up. +When the method is finished, the user will receive the name of the new variant +package you just set up. =head2 Using variable packages After your variable package is L<created|/Declaring a variable package> -your users can get a variant generating subroutine by simply importing +your users can get a variant generator subroutine by simply importing your package. use My::Variant; my $new_variant_package = Variant(@variant_arguments); + # the variant package is now fully initialized and used -The package is now fully initialized and used. You can import the -subroutine under a different name by specifying an C<as> argument. +You can import the subroutine under a different name by specifying an C<as> +argument. =head2 Dynamic creation of variant packages For regular uses, the L<normal import|/Using variable packages> provides -more than enough flexibility. However, if you want to create variations of +more than enough flexibility. However, if you want to create variants of dynamically determined packages, you can use the L</build_variant_of> method. -You can use this to create variations of other packages and pass arguments -on to them to allow more modular and extensible variations. +You can use this to create variants of other packages and pass arguments +on to them to allow more modular and extensible variants. =head1 OPTIONS @@ -260,7 +266,7 @@ This option is a hash reference mapping package names to array references containing import arguments. The packages will be imported with the given -arguments by every variation before the L</make_variant> method is asked +arguments by every variant before the L</make_variant> method is asked to create the package (this is done using L<Import::Into>). If import order is important to you, you can also pass the C<importing> @@ -290,7 +296,7 @@ An array reference of strings listing the names of subroutines that should be proxied. These subroutines are expected to be installed into the new variant package by the modules imported with L</importing>. Subroutines -with the same name will be available in your declaration package, and will +with the same name will be available in your variable package, and will proxy through to the newly created package when used within L</make_variant>. @@ -388,6 +394,8 @@ phaylon - Robert Sedlacek (cpan:PHAYLON) <r.sedla...@shadowcat.co.uk> +haarg - Graham Knop (cpan:HAARG) <ha...@haarg.org> + =head1 COPYRIGHT Copyright (c) 2010-2012 the C<Package::Variant> L</AUTHOR> and