Hello community,

here is the log from the commit of package perl-Moo for openSUSE:Factory 
checked in at 2016-07-12 23:51:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Moo (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Moo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Moo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Moo/perl-Moo.changes        2016-06-25 
02:24:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Moo.new/perl-Moo.changes   2016-07-12 
23:51:19.000000000 +0200
@@ -1,0 +2,26 @@
+Mon Jul  4 12:55:18 UTC 2016 - [email protected]
+
+- updated to 2.002004
+   see /usr/share/doc/packages/perl-Moo/Changes
+
+  2.002004 - 2016-06-28
+    - fixed another case of local functions interfering with generated code.
+      (RT#115655)
+    - prevent infinite recursion on some Moose metaclass inflation errors.
+
+-------------------------------------------------------------------
+Fri Jun 24 06:04:42 UTC 2016 - [email protected]
+
+- updated to 2.002003
+   see /usr/share/doc/packages/perl-Moo/Changes
+
+  2.002003 - 2016-06-23
+    - prevent local functions with same names as core functions from 
interfering
+      with generated code (RT#115529)
+    - Work around nmake bug that corrupts commands that include slashes
+      (RT#115518)
+    - Fix tests to work when lexical features are enabled outside of our 
control
+      (such as with cperl)
+    - Fix tests on perl 5.6
+
+-------------------------------------------------------------------

Old:
----
  Moo-2.002002.tar.gz

New:
----
  Moo-2.002004.tar.gz

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

Other differences:
------------------
++++++ perl-Moo.spec ++++++
--- /var/tmp/diff_new_pack.S8UcGp/_old  2016-07-12 23:51:19.000000000 +0200
+++ /var/tmp/diff_new_pack.S8UcGp/_new  2016-07-12 23:51:19.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Moo
-Version:        2.002002
+Version:        2.002004
 Release:        0
 %define cpan_name Moo
 Summary:        Minimalist Object Orientation (with Moose compatibility)

++++++ Moo-2.002002.tar.gz -> Moo-2.002004.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/Changes new/Moo-2.002004/Changes
--- old/Moo-2.002002/Changes    2016-06-21 04:16:37.000000000 +0200
+++ new/Moo-2.002004/Changes    2016-06-28 04:33:55.000000000 +0200
@@ -1,5 +1,19 @@
 Revision history for Moo
 
+2.002004 - 2016-06-28
+  - fixed another case of local functions interfering with generated code.
+    (RT#115655)
+  - prevent infinite recursion on some Moose metaclass inflation errors.
+
+2.002003 - 2016-06-23
+  - prevent local functions with same names as core functions from interfering
+    with generated code (RT#115529)
+  - Work around nmake bug that corrupts commands that include slashes
+    (RT#115518)
+  - Fix tests to work when lexical features are enabled outside of our control
+    (such as with cperl)
+  - Fix tests on perl 5.6
+
 2.002002 - 2016-06-21
   - fix handling of Carp < 1.12
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/MANIFEST new/Moo-2.002004/MANIFEST
--- old/Moo-2.002002/MANIFEST   2016-06-21 04:17:14.000000000 +0200
+++ new/Moo-2.002004/MANIFEST   2016-06-28 04:34:30.000000000 +0200
@@ -84,6 +84,7 @@
 t/non-moo-extends.t
 t/not-both.t
 t/overloaded-coderefs.t
+t/overridden-core-funcs.t
 t/perl-56-like.t
 t/strictures.t
 t/sub-and-handles.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/META.json new/Moo-2.002004/META.json
--- old/Moo-2.002002/META.json  2016-06-21 04:17:14.000000000 +0200
+++ new/Moo-2.002004/META.json  2016-06-28 04:34:30.000000000 +0200
@@ -86,7 +86,7 @@
       },
       "x_IRC" : "irc://irc.perl.org/#moose"
    },
-   "version" : "2.002002",
+   "version" : "2.002004",
    "x_authority" : "cpan:MSTROUT",
    "x_breaks" : {
       "App::Commando" : "<= 0.012",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/META.yml new/Moo-2.002004/META.yml
--- old/Moo-2.002002/META.yml   2016-06-21 04:17:13.000000000 +0200
+++ new/Moo-2.002004/META.yml   2016-06-28 04:34:30.000000000 +0200
@@ -35,7 +35,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.002002'
+version: '2.002004'
 x_authority: cpan:MSTROUT
 x_breaks:
   App::Commando: '<= 0.012'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/Makefile.PL new/Moo-2.002004/Makefile.PL
--- old/Moo-2.002002/Makefile.PL        2016-06-14 21:53:26.000000000 +0200
+++ new/Moo-2.002004/Makefile.PL        2016-06-23 07:57:07.000000000 +0200
@@ -96,7 +96,7 @@
 
   sub test_via_harness {
     my($self, $perl, $tests) = @_;
-    $perl .= ' -It/lib -MTestEnv=$(MOO_TEST_ENV)';
+    $perl .= ' -I'.$self->catdir('t','lib').' "-MTestEnv=$(MOO_TEST_ENV)"';
     return $self->SUPER::test_via_harness($perl, $tests);
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/lib/Method/Generate/Accessor.pm 
new/Moo-2.002004/lib/Method/Generate/Accessor.pm
--- old/Moo-2.002002/lib/Method/Generate/Accessor.pm    2016-06-14 
21:53:26.000000000 +0200
+++ new/Moo-2.002004/lib/Method/Generate/Accessor.pm    2016-06-23 
09:35:27.000000000 +0200
@@ -460,9 +460,9 @@
   .$code."),\n"
   ."    1\n"
   ."  } or\n"
-  .'    $_error = ref $@ ? $@ : '.$prefix.'.$@);'."\n"
+  .'    $_error = CORE::ref $@ ? $@ : '.$prefix.'.$@);'."\n"
   .'  ($@ = $_old_error),'."\n"
-  .'  (defined $_error and die $_error);'."\n"
+  .'  (defined $_error and CORE::die $_error);'."\n"
   .($want_return ? '  $_return;'."\n" : '')
   ."}\n"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/lib/Method/Generate/Constructor.pm 
new/Moo-2.002004/lib/Method/Generate/Constructor.pm
--- old/Moo-2.002002/lib/Method/Generate/Constructor.pm 2016-06-17 
11:55:47.000000000 +0200
+++ new/Moo-2.002004/lib/Method/Generate/Constructor.pm 2016-06-28 
03:21:16.000000000 +0200
@@ -146,8 +146,8 @@
   my $into_buildargs = $into->can('BUILDARGS');
 
   my $body
-    = '    my $invoker = shift;'."\n"
-    . '    my $class = ref($invoker) ? ref($invoker) : $invoker;'."\n"
+    = '    my $invoker = CORE::shift();'."\n"
+    . '    my $class = CORE::ref($invoker) ? CORE::ref($invoker) : 
$invoker;'."\n"
     . $self->_handle_subconstructor($into, $name)
     . ( $into_buildargs && $into_buildargs != \&Moo::Object::BUILDARGS
       ? $self->_generate_args_via_buildargs
@@ -192,7 +192,7 @@
 sub _generate_args_via_buildargs {
   my ($self) = @_;
   q{    my $args = $class->BUILDARGS(@_);}."\n"
-  .q{    Carp::croak("BUILDARGS did not return a hashref") unless ref($args) 
eq 'HASH';}
+  .q{    Carp::croak("BUILDARGS did not return a hashref") unless 
CORE::ref($args) eq 'HASH';}
   ."\n";
 }
 
@@ -201,7 +201,7 @@
   my ($self) = @_;
   return <<'_EOA';
     my $args = scalar @_ == 1
-      ? ref $_[0] eq 'HASH'
+      ? CORE::ref $_[0] eq 'HASH'
         ? { %{ $_[0] } }
         : Carp::croak("Single parameters to new() must be a HASH ref"
             . " data => ". $_[0])
@@ -247,7 +247,7 @@
   return '' unless @required_init;
   '    if (my @missing = grep !exists $args->{$_}, '
     .join(', ', map quotify($_), @required_init).') {'."\n"
-    .q{      Carp::croak("Missing required arguments: ".join(', ', sort 
@missing));}."\n"
+    .q{      Carp::croak("Missing required arguments: ".CORE::join(', ', sort 
@missing));}."\n"
     ."    }\n";
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/lib/Moo/HandleMoose.pm 
new/Moo-2.002004/lib/Moo/HandleMoose.pm
--- old/Moo-2.002002/lib/Moo/HandleMoose.pm     2016-06-17 11:55:27.000000000 
+0200
+++ new/Moo-2.002004/lib/Moo/HandleMoose.pm     2016-06-28 04:22:29.000000000 
+0200
@@ -79,145 +79,148 @@
     }
   };
 
-  foreach my $spec (values %$attr_specs) {
-    if (my $inflators = delete $spec->{moosify}) {
-      $_->($spec) for @$inflators;
+  {
+    local $DID_INJECT{$name} = 1;
+    foreach my $spec (values %$attr_specs) {
+      if (my $inflators = delete $spec->{moosify}) {
+        $_->($spec) for @$inflators;
+      }
     }
-  }
-
-  my %methods
-    = %{($am_role ? 'Moo::Role' : 'Moo')->_concrete_methods_of($name)};
-
-  # if stuff gets added afterwards, _maybe_reset_handlemoose should
-  # trigger the recreation of the metaclass but we need to ensure the
-  # Moo::Role cache is cleared so we don't confuse Moo itself.
-  if (my $info = $Moo::Role::INFO{$name}) {
-    delete $info->{methods};
-  }
 
-  # needed to ensure the method body is stable and get things named
-  $methods{$_} = Sub::Defer::undefer_sub($methods{$_})
-    for
-      grep $_ ne 'new',
-      keys %methods;
-  my @attrs;
-  {
-    # 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}};
-      my %spec_map = (
-        map { $_->name => $_->init_arg||$_->name }
-        (
-          (grep { $_->has_init_arg }
-             $meta->attribute_metaclass->meta->get_all_attributes),
-          grep { exists($_->{init_arg}) ? defined($_->init_arg) : 1 }
-          map {
-            my $meta = Moose::Util::resolve_metatrait_alias('Attribute', $_)
-                         ->meta;
-            map $meta->get_attribute($_), $meta->get_attribute_list
-          }  @{$spec{traits}||[]}
-        )
-      );
-      # have to hard code this because Moose's role meta-model is lacking
-      $spec_map{traits} ||= 'traits';
+    my %methods
+      = %{($am_role ? 'Moo::Role' : 'Moo')->_concrete_methods_of($name)};
 
-      $spec{is} = 'ro' if $spec{is} eq 'lazy' or $spec{is} eq 'rwp';
-      my $coerce = $spec{coerce};
-      if (my $isa = $spec{isa}) {
-        my $tc = $spec{isa} = do {
-          if (my $mapped = $TYPE_MAP{$isa}) {
-            my $type = $mapped->();
-            unless ( Scalar::Util::blessed($type)
-                && $type->isa("Moose::Meta::TypeConstraint") ) {
-              croak "error inflating attribute '$name' for package '$_[0]': "
-                ."\$TYPE_MAP{$isa} did not return a valid type constraint'";
+    # if stuff gets added afterwards, _maybe_reset_handlemoose should
+    # trigger the recreation of the metaclass but we need to ensure the
+    # Moo::Role cache is cleared so we don't confuse Moo itself.
+    if (my $info = $Moo::Role::INFO{$name}) {
+      delete $info->{methods};
+    }
+
+    # needed to ensure the method body is stable and get things named
+    $methods{$_} = Sub::Defer::undefer_sub($methods{$_})
+      for
+        grep $_ ne 'new',
+        keys %methods;
+    my @attrs;
+    {
+      # 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}};
+        my %spec_map = (
+          map { $_->name => $_->init_arg||$_->name }
+          (
+            (grep { $_->has_init_arg }
+              $meta->attribute_metaclass->meta->get_all_attributes),
+            grep { exists($_->{init_arg}) ? defined($_->init_arg) : 1 }
+            map {
+              my $meta = Moose::Util::resolve_metatrait_alias('Attribute', $_)
+                          ->meta;
+              map $meta->get_attribute($_), $meta->get_attribute_list
+            }  @{$spec{traits}||[]}
+          )
+        );
+        # have to hard code this because Moose's role meta-model is lacking
+        $spec_map{traits} ||= 'traits';
+
+        $spec{is} = 'ro' if $spec{is} eq 'lazy' or $spec{is} eq 'rwp';
+        my $coerce = $spec{coerce};
+        if (my $isa = $spec{isa}) {
+          my $tc = $spec{isa} = do {
+            if (my $mapped = $TYPE_MAP{$isa}) {
+              my $type = $mapped->();
+              unless ( Scalar::Util::blessed($type)
+                  && $type->isa("Moose::Meta::TypeConstraint") ) {
+                croak "error inflating attribute '$name' for package '$_[0]': "
+                  ."\$TYPE_MAP{$isa} did not return a valid type constraint'";
+              }
+              $coerce ? $type->create_child_type(name => $type->name) : $type;
+            } else {
+              Moose::Meta::TypeConstraint->new(
+                constraint => sub { eval { &$isa; 1 } }
+              );
             }
-            $coerce ? $type->create_child_type(name => $type->name) : $type;
-          } else {
-            Moose::Meta::TypeConstraint->new(
-              constraint => sub { eval { &$isa; 1 } }
-            );
+          };
+          if ($coerce) {
+            $tc->coercion(Moose::Meta::TypeCoercion->new)
+              ->_compiled_type_coercion($coerce);
+            $spec{coerce} = 1;
           }
-        };
-        if ($coerce) {
+        } elsif ($coerce) {
+          my $attr = quotify($name);
+          my $tc = Moose::Meta::TypeConstraint->new(
+                    constraint => sub { die "This is not going to work" },
+                    inlined => sub {
+                        'my $r = $_[42]{'.$attr.'}; $_[42]{'.$attr.'} = 1; $r'
+                    },
+                  );
           $tc->coercion(Moose::Meta::TypeCoercion->new)
-             ->_compiled_type_coercion($coerce);
+            ->_compiled_type_coercion($coerce);
+          $spec{isa} = $tc;
           $spec{coerce} = 1;
         }
-      } elsif ($coerce) {
-        my $attr = quotify($name);
-        my $tc = Moose::Meta::TypeConstraint->new(
-                   constraint => sub { die "This is not going to work" },
-                   inlined => sub {
-                      'my $r = $_[42]{'.$attr.'}; $_[42]{'.$attr.'} = 1; $r'
-                   },
-                 );
-        $tc->coercion(Moose::Meta::TypeCoercion->new)
-           ->_compiled_type_coercion($coerce);
-        $spec{isa} = $tc;
-        $spec{coerce} = 1;
-      }
-      %spec =
-        map { $spec_map{$_} => $spec{$_} }
-        grep { exists $spec_map{$_} }
-        keys %spec;
-      push @attrs, $meta->add_attribute($name => %spec);
-    }
-    foreach my $mouse (do { our %MOUSE; @{$MOUSE{$name}||[]} }) {
-      foreach my $attr ($mouse->get_all_attributes) {
-        my %spec = %{$attr};
-        delete @spec{qw(
-          associated_class associated_methods __METACLASS__
-          provides curries
-        )};
-        my $name = delete $spec{name};
-        next if $seen_name{$name}++;
+        %spec =
+          map { $spec_map{$_} => $spec{$_} }
+          grep { exists $spec_map{$_} }
+          keys %spec;
         push @attrs, $meta->add_attribute($name => %spec);
       }
+      foreach my $mouse (do { our %MOUSE; @{$MOUSE{$name}||[]} }) {
+        foreach my $attr ($mouse->get_all_attributes) {
+          my %spec = %{$attr};
+          delete @spec{qw(
+            associated_class associated_methods __METACLASS__
+            provides curries
+          )};
+          my $name = delete $spec{name};
+          next if $seen_name{$name}++;
+          push @attrs, $meta->add_attribute($name => %spec);
+        }
+      }
+    }
+    foreach my $meth_name (keys %methods) {
+      my $meth_code = $methods{$meth_name};
+      $meta->add_method($meth_name, $meth_code);
     }
-  }
-  foreach my $meth_name (keys %methods) {
-    my $meth_code = $methods{$meth_name};
-    $meta->add_method($meth_name, $meth_code);
-  }
 
-  if ($am_role) {
-    my $info = $Moo::Role::INFO{$name};
-    $meta->add_required_methods(@{$info->{requires}});
-    foreach my $modifier (@{$info->{modifiers}}) {
-      my ($type, @args) = @$modifier;
-      my $code = pop @args;
-      $meta->${\"add_${type}_method_modifier"}($_, $code) for @args;
+    if ($am_role) {
+      my $info = $Moo::Role::INFO{$name};
+      $meta->add_required_methods(@{$info->{requires}});
+      foreach my $modifier (@{$info->{modifiers}}) {
+        my ($type, @args) = @$modifier;
+        my $code = pop @args;
+        $meta->${\"add_${type}_method_modifier"}($_, $code) for @args;
+      }
     }
+    elsif ($am_class) {
+      foreach my $attr (@attrs) {
+        foreach my $method (@{$attr->associated_methods}) {
+          $method->{body} = $name->can($method->name);
+        }
+      }
+      bless(
+        $meta->find_method_by_name('new'),
+        'Moo::HandleMoose::FakeConstructor',
+      );
+      my $meta_meth;
+      if (
+        $meta_meth = $meta->find_method_by_name('meta')
+        and $meta_meth->body == \&Moo::Object::meta
+      ) {
+        bless($meta_meth, 'Moo::HandleMoose::FakeMeta');
+      }
+      # a combination of Moo and Moose may bypass a Moo constructor but still
+      # use a Moo DEMOLISHALL.  We need to make sure this is loaded before
+      # global destruction.
+      require Method::Generate::DemolishAll;
+    }
+    $meta->add_role(Class::MOP::class_of($_))
+      for grep !/\|/ && $_ ne $name, # reject Foo|Bar and same-role-as-self
+        do { no warnings 'once'; keys %{$Moo::Role::APPLIED_TO{$name}} };
   }
-  elsif ($am_class) {
-    foreach my $attr (@attrs) {
-      foreach my $method (@{$attr->associated_methods}) {
-        $method->{body} = $name->can($method->name);
-      }
-    }
-    bless(
-      $meta->find_method_by_name('new'),
-      'Moo::HandleMoose::FakeConstructor',
-    );
-    my $meta_meth;
-    if (
-      $meta_meth = $meta->find_method_by_name('meta')
-      and $meta_meth->body == \&Moo::Object::meta
-    ) {
-      bless($meta_meth, 'Moo::HandleMoose::FakeMeta');
-    }
-    # a combination of Moo and Moose may bypass a Moo constructor but still
-    # use a Moo DEMOLISHALL.  We need to make sure this is loaded before
-    # global destruction.
-    require Method::Generate::DemolishAll;
-  }
-  $meta->add_role(Class::MOP::class_of($_))
-    for grep !/\|/ && $_ ne $name, # reject Foo|Bar and same-role-as-self
-      do { no warnings 'once'; keys %{$Moo::Role::APPLIED_TO{$name}} };
   $DID_INJECT{$name} = 1;
   $meta;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/lib/Moo/Role.pm 
new/Moo-2.002004/lib/Moo/Role.pm
--- old/Moo-2.002002/lib/Moo/Role.pm    2016-06-21 04:16:25.000000000 +0200
+++ new/Moo-2.002004/lib/Moo/Role.pm    2016-06-28 04:33:43.000000000 +0200
@@ -25,7 +25,7 @@
   );
 }
 
-our $VERSION = '2.002002';
+our $VERSION = '2.002004';
 $VERSION = eval $VERSION;
 
 require Moo::sification;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/lib/Moo.pm new/Moo-2.002004/lib/Moo.pm
--- old/Moo-2.002002/lib/Moo.pm 2016-06-21 04:16:25.000000000 +0200
+++ new/Moo-2.002004/lib/Moo.pm 2016-06-28 04:33:43.000000000 +0200
@@ -22,7 +22,7 @@
   );
 }
 
-our $VERSION = '2.002002';
+our $VERSION = '2.002004';
 $VERSION = eval $VERSION;
 
 require Moo::sification;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/lib/Sub/Defer.pm 
new/Moo-2.002004/lib/Sub/Defer.pm
--- old/Moo-2.002002/lib/Sub/Defer.pm   2016-06-21 04:16:25.000000000 +0200
+++ new/Moo-2.002004/lib/Sub/Defer.pm   2016-06-28 04:33:43.000000000 +0200
@@ -6,7 +6,7 @@
 use Scalar::Util qw(weaken);
 use Carp qw(croak);
 
-our $VERSION = '2.002002';
+our $VERSION = '2.002004';
 $VERSION = eval $VERSION;
 
 our @EXPORT = qw(defer_sub undefer_sub undefer_all);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/lib/Sub/Quote.pm 
new/Moo-2.002004/lib/Sub/Quote.pm
--- old/Moo-2.002002/lib/Sub/Quote.pm   2016-06-21 04:16:25.000000000 +0200
+++ new/Moo-2.002004/lib/Sub/Quote.pm   2016-06-28 04:33:43.000000000 +0200
@@ -15,7 +15,7 @@
   *_HAVE_PERLSTRING = defined &B::perlstring ? sub(){1} : sub(){0};
 }
 
-our $VERSION = '2.002002';
+our $VERSION = '2.002004';
 $VERSION = eval $VERSION;
 
 our @EXPORT = qw(quote_sub unquote_sub quoted_from_sub qsub);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/t/overridden-core-funcs.t 
new/Moo-2.002004/t/overridden-core-funcs.t
--- old/Moo-2.002002/t/overridden-core-funcs.t  1970-01-01 01:00:00.000000000 
+0100
+++ new/Moo-2.002004/t/overridden-core-funcs.t  2016-06-28 03:43:53.000000000 
+0200
@@ -0,0 +1,79 @@
+use Moo::_strictures;
+use Test::More;
+use Test::Fatal;
+
+
+BEGIN {
+  package AddOverrides;
+  $INC{"AddOverrides.pm"} = __FILE__;
+  use Carp ();
+  sub import {
+    my $package = caller;
+    for my $sub (
+      'defined',
+      'join',
+      'ref',
+      'die',
+      'shift',
+      'sort',
+      'undef',
+    ) {
+      my $proto = prototype "CORE::$sub";
+      no strict 'refs';
+      *{"${package}::$sub"} = \&{"${package}::$sub"};
+      eval "sub ${package}::$sub ".($proto ? "($proto)" : '') . ' { 
Carp::confess("local '.$sub.'") }; 1'
+        or die $@;
+    }
+  }
+}
+
+{
+  package Foo;
+  use Moo;
+  sub welp { 1 }
+}
+
+{
+  package WithOverridden;
+  use AddOverrides;
+  use Moo;
+
+  sub BUILD { 1 }
+  sub DEMOLISH { CORE::die "demolish\n" if $::FATAL_DEMOLISH }
+  around BUILDARGS => sub {
+    my $orig = CORE::shift();
+    my $self = CORE::shift();
+    $self->$orig(@_);
+  };
+
+  has attr1 => (is => 'ro', required => 1, handles => ['welp']);
+  has attr2 => (is => 'ro', default => CORE::undef());
+  has attr3 => (is => 'rw', isa => sub { CORE::die "nope" } );
+}
+
+unlike exception { WithOverridden->new(1) }, qr/local/,
+  'bad constructor arguments error ignores local functions';
+unlike exception { WithOverridden->new }, qr/local/,
+  'missing attributes error ignores local functions';
+unlike exception { WithOverridden->new(attr1 => 1, attr3 => 1) }, qr/local/,
+  'constructor isa checks ignores local functions';
+my $o;
+is exception { $o = WithOverridden->new(attr1 => Foo->new) }, undef,
+  'constructor without error ignores local functions';
+unlike exception { $o->attr3(1) }, qr/local/,
+  'isa checks ignores local functions';
+is exception { $o->welp }, undef,
+  'delegates ignores local functions';
+
+{
+  no warnings FATAL => 'all';
+  use warnings 'all';
+  my $w = '';
+  local $SIG{__WARN__} = sub { $w .= $_[0] };
+  local $::FATAL_DEMOLISH = 1;
+  undef $o;
+  unlike $w, qr/local/,
+    'destroy ignores local functions';
+}
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/t/sub-quote.t 
new/Moo-2.002004/t/sub-quote.t
--- old/Moo-2.002002/t/sub-quote.t      2016-06-17 11:09:27.000000000 +0200
+++ new/Moo-2.002004/t/sub-quote.t      2016-06-21 19:41:21.000000000 +0200
@@ -118,6 +118,8 @@
 {
   use strict;
   no strict 'subs';
+  local $TODO = "hints from caller not available on perl < 5.8"
+    if "$]" < 5.008_000;
   like exception { quote_sub(q{ my $f = SomeBareword; ${"string_ref"} })->(); 
},
     qr/strict refs/,
     'hints preserved from context';
@@ -179,6 +181,7 @@
   $INC{'UseHintHash.pm'} = 1;
 
   sub import {
+    $^H |= 0x020000;
     $^H{__PACKAGE__.'/enabled'} = 1;
   }
 }
@@ -186,6 +189,10 @@
 {
   my %hints;
   {
+    BEGIN {
+      $^H |= 0x020000;
+      %^H = ();
+    }
     use UseHintHash;
     BEGIN { %hints = %^H }
   }
@@ -194,6 +201,10 @@
     local $TODO = 'hints hash from context not available on perl 5.8'
       if "$]" < 5.010_000;
 
+    BEGIN {
+      $^H |= 0x020000;
+      %^H = ();
+    }
     use UseHintHash;
     is_deeply quote_sub(q{
       our %temp_hints_hash;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.002002/xt/moose-inflate-error-recurse.t 
new/Moo-2.002004/xt/moose-inflate-error-recurse.t
--- old/Moo-2.002002/xt/moose-inflate-error-recurse.t   2016-04-14 
13:24:06.000000000 +0200
+++ new/Moo-2.002004/xt/moose-inflate-error-recurse.t   2016-06-28 
04:23:18.000000000 +0200
@@ -4,6 +4,14 @@
 
 use Moose ();
 BEGIN {
+  $SIG{__WARN__} = sub {
+    die $_[0]
+      if $_[0] =~ /Deep recursion/;
+    warn $_[0];
+  };
+}
+
+BEGIN {
   package Role1;
   use Moo::Role;
   has attr1 => (is => 'ro', lazy => 1);
@@ -22,4 +30,27 @@
     'reasonable error rather than deep recursion for inflating invalid attr',
   );
 }
+
+BEGIN {
+  package WTF::Trait;
+  use Moose::Role;
+  use Moose::Util;
+  Moose::Util::meta_attribute_alias('WTF');
+  has wtf => (is => 'ro', required => 1);
+}
+
+BEGIN {
+  package WTF::Class;
+  use Moo;
+  has ftw => (is => 'ro', traits => [ 'WTF' ]);
+}
+
+like(
+  exception {
+    WTF::Class->meta->get_attribute('ftw');
+  },
+  qr/Attribute \(wtf\) is required/,
+  'reasonable error rather than deep recursion for inflating invalid attr 
(traits)',
+);
+
 done_testing;


Reply via email to