Hello community,

here is the log from the commit of package perl-Moo for openSUSE:Factory 
checked in at 2017-03-13 15:33:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Moo (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Moo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Moo"

Mon Mar 13 15:33:30 2017 rev:19 rq:478925 version:2.003001

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Moo/perl-Moo.changes        2017-01-22 
00:49:24.326979559 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Moo.new/perl-Moo.changes   2017-03-13 
15:35:02.321089443 +0100
@@ -1,0 +2,11 @@
+Tue Mar  7 06:59:39 UTC 2017 - co...@suse.com
+
+- updated to 2.003001
+   see /usr/share/doc/packages/perl-Moo/Changes
+
+  2.003001 - 2017-03-06
+    - fix +attributes replacing builder subs if parent attribute was defined 
with
+      builder => $subref
+    - fix trigger with a default value and init_arg of undef
+
+-------------------------------------------------------------------

Old:
----
  Moo-2.003000.tar.gz

New:
----
  Moo-2.003001.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Moo.spec ++++++
--- /var/tmp/diff_new_pack.NQKjuC/_old  2017-03-13 15:35:02.825018229 +0100
+++ /var/tmp/diff_new_pack.NQKjuC/_new  2017-03-13 15:35:02.825018229 +0100
@@ -17,14 +17,14 @@
 
 
 Name:           perl-Moo
-Version:        2.003000
+Version:        2.003001
 Release:        0
 %define cpan_name Moo
 Summary:        Minimalist Object Orientation (with Moose compatibility)
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Moo/
-Source0:        
http://www.cpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ Moo-2.003000.tar.gz -> Moo-2.003001.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/Changes new/Moo-2.003001/Changes
--- old/Moo-2.003000/Changes    2016-12-09 14:52:05.000000000 +0100
+++ new/Moo-2.003001/Changes    2017-03-06 18:05:46.000000000 +0100
@@ -1,5 +1,10 @@
 Revision history for Moo
 
+2.003001 - 2017-03-06
+  - fix +attributes replacing builder subs if parent attribute was defined with
+    builder => $subref
+  - fix trigger with a default value and init_arg of undef
+
 2.003000 - 2016-12-09
   - fix create_class_with_roles being used multiple times with the same 
packages
   - fix edge case with @ISA assignment on perl 5.10.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/MANIFEST new/Moo-2.003001/MANIFEST
--- old/Moo-2.003000/MANIFEST   2016-12-09 20:02:42.000000000 +0100
+++ new/Moo-2.003001/MANIFEST   2017-03-06 18:06:20.000000000 +0100
@@ -108,6 +108,7 @@
 xt/moo-consume-mouse-role-coerce.t
 xt/moo-does-moose-role.t
 xt/moo-does-mouse-role.t
+xt/moo-extend-moose.t
 xt/moo-inflate.t
 xt/moo-object-meta-can.t
 xt/moo-role-types.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/META.json new/Moo-2.003001/META.json
--- old/Moo-2.003000/META.json  2016-12-09 20:02:41.000000000 +0100
+++ new/Moo-2.003001/META.json  2017-03-06 18:06:20.000000000 +0100
@@ -4,7 +4,7 @@
       "mst - Matt S. Trout (cpan:MSTROUT) <m...@shadowcat.co.uk>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter 
version 2.150005",
+   "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter 
version 2.143240",
    "license" : [
       "perl_5"
    ],
@@ -88,7 +88,7 @@
       },
       "x_IRC" : "irc://irc.perl.org/#moose"
    },
-   "version" : "2.003000",
+   "version" : "2.003001",
    "x_authority" : "cpan:MSTROUT",
    "x_breaks" : {
       "App::Commando" : "<= 0.012",
@@ -103,6 +103,5 @@
          "use_strict" : "internal module used to apply strict",
          "use_warnings" : "internal module used to apply warnings"
       }
-   },
-   "x_serialization_backend" : "JSON::PP version 2.27300"
+   }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/META.yml new/Moo-2.003001/META.yml
--- old/Moo-2.003000/META.yml   2016-12-09 20:02:41.000000000 +0100
+++ new/Moo-2.003001/META.yml   2017-03-06 18:06:20.000000000 +0100
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 
2.150005'
+generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 
2.143240'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -37,7 +37,7 @@
   bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Moo
   license: http://dev.perl.org/licenses/
   repository: https://github.com/moose/Moo.git
-version: '2.003000'
+version: '2.003001'
 x_authority: cpan:MSTROUT
 x_breaks:
   App::Commando: '<= 0.012'
@@ -50,4 +50,3 @@
   ignore:
     use_strict: 'internal module used to apply strict'
     use_warnings: 'internal module used to apply warnings'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/README new/Moo-2.003001/README
--- old/Moo-2.003000/README     2016-12-09 20:02:42.000000000 +0100
+++ new/Moo-2.003001/README     2017-03-06 18:06:20.000000000 +0100
@@ -117,9 +117,10 @@
     If a new enough version of Class::XSAccessor is available, it will be
     used to generate simple accessors, readers, and writers for better
     performance. Simple accessors are those without lazy defaults, type
-    checks/coercions, or triggers. Readers and writers generated by
-    Class::XSAccessor will behave slightly differently: they will reject
-    attempts to call them with the incorrect number of parameters.
+    checks/coercions, or triggers. Simple readers are those without lazy
+    defaults. Readers and writers generated by Class::XSAccessor will behave
+    slightly differently: they will reject attempts to call them with the
+    incorrect number of parameters.
 
 MOO VERSUS ANY::MOOSE
     Any::Moose will load Mouse normally, and Moose in a program using Moose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/lib/Method/Generate/Accessor.pm 
new/Moo-2.003001/lib/Method/Generate/Accessor.pm
--- old/Moo-2.003000/lib/Method/Generate/Accessor.pm    2016-12-09 
14:42:37.000000000 +0100
+++ new/Moo-2.003001/lib/Method/Generate/Accessor.pm    2017-03-06 
10:46:36.000000000 +0100
@@ -194,8 +194,8 @@
         ;
     }
   }
-  if (my $pred = $spec->{builder_sub}) {
-    _install_coderef( "${into}::$spec->{builder}" => $spec->{builder_sub} );
+  if (my $builder = delete $spec->{builder_sub}) {
+    _install_coderef( "${into}::$spec->{builder}" => $builder );
   }
   if (my $cl = $spec->{clearer}) {
     _die_overwrite($into, $cl, 'a clearer')
@@ -572,10 +572,10 @@
     $spec->{trigger}
   ) : undef;
   if ($has_default) {
-    "($set)," . ($trigger ? "($test and $trigger)," : '')
+    "($set)," . ($trigger && $test ? "($test and $trigger)," : '') . "\n";
   }
   else {
-    "($test and ($set)" . ($trigger ? ", ($trigger)" : '') . "),";
+    "($test and ($set)" . ($trigger ? ", ($trigger)" : '') . "),\n";
   }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/lib/Moo/HandleMoose.pm 
new/Moo-2.003001/lib/Moo/HandleMoose.pm
--- old/Moo-2.003000/lib/Moo/HandleMoose.pm     2016-12-09 07:56:24.000000000 
+0100
+++ new/Moo-2.003001/lib/Moo/HandleMoose.pm     2017-02-21 04:43:33.000000000 
+0100
@@ -107,9 +107,9 @@
       # This local is completely not required for roles but harmless
       local @{_getstash($name)}{keys %methods};
       my %seen_name;
-      foreach my $name (@$attr_order) {
-        $seen_name{$name} = 1;
-        my %spec = %{$attr_specs->{$name}};
+      foreach my $attr_name (@$attr_order) {
+        $seen_name{$attr_name} = 1;
+        my %spec = %{$attr_specs->{$attr_name}};
         my %spec_map = (
           map { $_->name => $_->init_arg||$_->name }
           (
@@ -134,7 +134,7 @@
               my $type = $mapped->();
               unless ( Scalar::Util::blessed($type)
                   && $type->isa("Moose::Meta::TypeConstraint") ) {
-                croak "error inflating attribute '$name' for package '$_[0]': "
+                croak "error inflating attribute '$attr_name' for package 
'$name': "
                   ."\$TYPE_MAP{$isa} did not return a valid type constraint'";
               }
               $coerce ? $type->create_child_type(name => $type->name) : $type;
@@ -150,7 +150,7 @@
             $spec{coerce} = 1;
           }
         } elsif ($coerce) {
-          my $attr = quotify($name);
+          my $attr = quotify($attr_name);
           my $tc = Moose::Meta::TypeConstraint->new(
                     constraint => sub { die "This is not going to work" },
                     inlined => sub {
@@ -166,7 +166,7 @@
           map { $spec_map{$_} => $spec{$_} }
           grep { exists $spec_map{$_} }
           keys %spec;
-        push @attrs, $meta->add_attribute($name => %spec);
+        push @attrs, $meta->add_attribute($attr_name => %spec);
       }
       foreach my $mouse (do { our %MOUSE; @{$MOUSE{$name}||[]} }) {
         foreach my $attr ($mouse->get_all_attributes) {
@@ -175,9 +175,9 @@
             associated_class associated_methods __METACLASS__
             provides curries
           )};
-          my $name = delete $spec{name};
-          next if $seen_name{$name}++;
-          push @attrs, $meta->add_attribute($name => %spec);
+          my $attr_name = delete $spec{name};
+          next if $seen_name{$attr_name}++;
+          push @attrs, $meta->add_attribute($attr_name => %spec);
         }
       }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/lib/Moo/Role.pm 
new/Moo-2.003001/lib/Moo/Role.pm
--- old/Moo-2.003000/lib/Moo/Role.pm    2016-12-09 14:51:10.000000000 +0100
+++ new/Moo-2.003001/lib/Moo/Role.pm    2017-03-06 18:05:43.000000000 +0100
@@ -23,7 +23,7 @@
   );
 }
 
-our $VERSION = '2.003000';
+our $VERSION = '2.003001';
 $VERSION = eval $VERSION;
 
 require Moo::sification;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/lib/Moo.pm new/Moo-2.003001/lib/Moo.pm
--- old/Moo-2.003000/lib/Moo.pm 2016-12-09 14:51:10.000000000 +0100
+++ new/Moo-2.003001/lib/Moo.pm 2017-03-06 18:05:43.000000000 +0100
@@ -22,7 +22,7 @@
   );
 }
 
-our $VERSION = '2.003000';
+our $VERSION = '2.003001';
 $VERSION = eval $VERSION;
 
 require Moo::sification;
@@ -377,11 +377,11 @@
 
 =head1 MOO AND CLASS::XSACCESSOR
 
-If a new enough version of L<Class::XSAccessor> is available, it
-will be used to generate simple accessors, readers, and writers for
-better performance.  Simple accessors are those without lazy defaults,
-type checks/coercions, or triggers.  Readers and writers generated
-by L<Class::XSAccessor> will behave slightly differently: they will
+If a new enough version of L<Class::XSAccessor> is available, it will be used
+to generate simple accessors, readers, and writers for better performance.
+Simple accessors are those without lazy defaults, type checks/coercions, or
+triggers.  Simple readers are those without lazy defaults. Readers and writers
+generated by L<Class::XSAccessor> will behave slightly differently: they will
 reject attempts to call them with the incorrect number of parameters.
 
 =head1 MOO VERSUS ANY::MOOSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/t/accessor-trigger.t 
new/Moo-2.003001/t/accessor-trigger.t
--- old/Moo-2.003000/t/accessor-trigger.t       2016-10-31 01:06:02.000000000 
+0100
+++ new/Moo-2.003001/t/accessor-trigger.t       2017-02-21 04:43:33.000000000 
+0100
@@ -131,4 +131,19 @@
 like exception { TriggerWriter->new->_set_attr( 4 ) },
   qr/triggered/, "trigger triggered via writer";
 
+is exception {
+  package TriggerNoInit;
+  use Moo;
+  has attr => (
+    is      => 'rw',
+    default => 1,
+    init_arg => undef,
+    trigger => sub { die 'triggered' },
+  );
+}, undef,
+  'trigger+default+init_arg undef works';
+
+is exception { TriggerNoInit->new }, undef,
+  'trigger not called on default without init_arg';
+
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/t/has-plus.t 
new/Moo-2.003001/t/has-plus.t
--- old/Moo-2.003000/t/has-plus.t       2016-12-09 07:56:24.000000000 +0100
+++ new/Moo-2.003001/t/has-plus.t       2017-03-06 10:44:54.000000000 +0100
@@ -79,4 +79,23 @@
 is(UsesTheRole2->new->f, 2, 'role attr with +');
 is(ExtendsTheClass->new->f, 3, 'class attr with +');
 
+{
+  package HasBuilderSub;
+  use Moo;
+  has f => (is => 'ro', builder => sub { __PACKAGE__ });
+}
+
+{
+  package ExtendsBuilderSub;
+  use Moo;
+  extends 'HasBuilderSub';
+  has '+f' => (init_arg => undef);
+  sub _build_f { __PACKAGE__ }
+}
+
+is +ExtendsBuilderSub->new->_build_f, 'ExtendsBuilderSub',
+  'build sub not replaced by +attr';
+is +ExtendsBuilderSub->new->f, 'ExtendsBuilderSub',
+  'correct build sub used after +attr';
+
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/xt/handle_moose.t 
new/Moo-2.003001/xt/handle_moose.t
--- old/Moo-2.003000/xt/handle_moose.t  2016-10-31 01:06:02.000000000 +0100
+++ new/Moo-2.003001/xt/handle_moose.t  2017-02-21 04:43:33.000000000 +0100
@@ -1,7 +1,34 @@
 use Moo::_strictures;
+use Test::More;
 use Test::Fatal;
+use Sub::Quote qw(quote_sub);
 
-BEGIN { require "./t/moo-accessors.t"; }
+{
+  package Foo;
+
+  use Moo;
+
+  has one => (is => 'ro');
+  has two => (is => 'rw', init_arg => undef);
+  has three => (is => 'ro', init_arg => 'THREE', required => 1);
+
+  package Bar;
+
+  use Moo::Role;
+
+  has four => (is => 'ro');
+  ::quote_sub 'Bar::quoted' => '1';
+
+  package Baz;
+
+  use Moo;
+
+  extends 'Foo';
+
+  with 'Bar';
+
+  has five => (is => 'rw');
+}
 
 require Moose;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/xt/moo-extend-moose.t 
new/Moo-2.003001/xt/moo-extend-moose.t
--- old/Moo-2.003000/xt/moo-extend-moose.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/Moo-2.003001/xt/moo-extend-moose.t      2017-02-21 04:43:33.000000000 
+0100
@@ -0,0 +1,46 @@
+use Moo::_strictures;
+use Test::More;
+use Test::Fatal;
+
+BEGIN {
+  package MooseRole;
+  use Moose::Role;
+  has attr_from_role => ( is => 'ro' );
+}
+
+BEGIN {
+  package MooseParent;
+  use Moose;
+  with 'MooseRole';
+  has attr_from_parent => ( is => 'ro' ),
+}
+
+BEGIN {
+  package MooRole;
+  use Moo::Role;
+  has attr_from_role2 => ( is => 'ro' );
+}
+
+BEGIN {
+  package MooChild;
+  use Moo;
+  extends 'MooseParent';
+  with 'MooRole';
+  has attr_from_child => ( is => 'ro' );
+}
+
+my $o = MooChild->new(
+  attr_from_role => 1,
+  attr_from_parent => 2,
+  attr_from_role2 => 3,
+  attr_from_child => 4,
+);
+is $o->attr_from_role, 1;
+is $o->attr_from_parent, 2;
+is $o->attr_from_role2, 3;
+is $o->attr_from_child, 4;
+
+ok +MooChild->meta->does_role('MooseRole');
+ok +MooChild->does('MooseRole');
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/xt/moose-extend-moo.t 
new/Moo-2.003001/xt/moose-extend-moo.t
--- old/Moo-2.003000/xt/moose-extend-moo.t      2016-10-31 01:06:02.000000000 
+0100
+++ new/Moo-2.003001/xt/moose-extend-moo.t      2017-02-21 04:43:33.000000000 
+0100
@@ -3,7 +3,7 @@
 use Test::Fatal;
 
 BEGIN {
-  package Parent;
+  package MooParent;
   use Moo;
   has message => ( is => 'ro', required => 1 ),
 }
@@ -11,7 +11,7 @@
 BEGIN {
   package Child;
   use Moose;
-  extends 'Parent';
+  extends 'MooParent';
   use Moose::Util::TypeConstraints;
   use namespace::clean;   # <-- essential
   has message => (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.003000/xt/moose-inflate-error-recurse.t 
new/Moo-2.003001/xt/moose-inflate-error-recurse.t
--- old/Moo-2.003000/xt/moose-inflate-error-recurse.t   2016-10-31 
01:06:02.000000000 +0100
+++ new/Moo-2.003001/xt/moose-inflate-error-recurse.t   2017-02-21 
04:43:33.000000000 +0100
@@ -4,10 +4,17 @@
 
 use Moose ();
 BEGIN {
+  my $sigwarn = $SIG{__WARN__};
   $SIG{__WARN__} = sub {
     die $_[0]
       if $_[0] =~ /Deep recursion/;
-    warn $_[0];
+    if ($sigwarn) {
+      no strict 'refs';
+      goto &$sigwarn;
+    }
+    else {
+      warn $_[0];
+    }
   };
 }
 


Reply via email to