Hello community,

here is the log from the commit of package perl-Moo for openSUSE:Factory 
checked in at 2020-11-23 15:49:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Moo (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Moo.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Moo"

Mon Nov 23 15:49:42 2020 rev:24 rq:850147 version:2.004003

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Moo/perl-Moo.changes        2020-04-21 
13:05:36.320206539 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Moo.new.5913/perl-Moo.changes      
2020-11-23 18:55:27.297669293 +0100
@@ -1,0 +2,18 @@
+Sun Nov 22 03:06:21 UTC 2020 - Tina Müller <timueller+p...@suse.de>
+
+- updated to 2.004003
+   see /usr/share/doc/packages/perl-Moo/Changes
+
+  2.004003 - 2020-11-21
+    - fix extraneous MANIFEST entry
+
+  2.004002 - 2020-11-20
+    - no changes
+    - releasing as stable
+
+  2.004_001 - 2020-07-30
+    - remove Module::Runtime prerequisite
+    - internal code cleanups
+    - added test for conflicts in extensions wrapping 'has' and similar subs
+
+-------------------------------------------------------------------

Old:
----
  Moo-2.004000.tar.gz

New:
----
  Moo-2.004003.tar.gz

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

Other differences:
------------------
++++++ perl-Moo.spec ++++++
--- /var/tmp/diff_new_pack.R7fobP/_old  2020-11-23 18:55:27.837669839 +0100
+++ /var/tmp/diff_new_pack.R7fobP/_new  2020-11-23 18:55:27.841669844 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Moo
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
 
 
 Name:           perl-Moo
-Version:        2.004000
+Version:        2.004003
 Release:        0
 %define cpan_name Moo
 Summary:        Minimalist Object Orientation (with Moose compatibility)
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
-Url:            https://metacpan.org/release/%{cpan_name}
+URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
@@ -31,14 +31,12 @@
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(Class::Method::Modifiers) >= 1.10
-BuildRequires:  perl(Module::Runtime) >= 0.014
 BuildRequires:  perl(Role::Tiny) >= 2.001004
 BuildRequires:  perl(Sub::Defer) >= 2.006006
 BuildRequires:  perl(Sub::Quote) >= 2.006006
 BuildRequires:  perl(Test::Fatal) >= 0.003
 BuildRequires:  perl(Test::More) >= 0.94
 Requires:       perl(Class::Method::Modifiers) >= 1.10
-Requires:       perl(Module::Runtime) >= 0.014
 Requires:       perl(Role::Tiny) >= 2.001004
 Requires:       perl(Sub::Defer) >= 2.006006
 Requires:       perl(Sub::Quote) >= 2.006006

++++++ Moo-2.004000.tar.gz -> Moo-2.004003.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/Changes new/Moo-2.004003/Changes
--- old/Moo-2.004000/Changes    2020-04-09 19:56:16.000000000 +0200
+++ new/Moo-2.004003/Changes    2020-11-21 05:04:25.000000000 +0100
@@ -1,5 +1,17 @@
 Revision history for Moo
 
+2.004003 - 2020-11-21
+  - fix extraneous MANIFEST entry
+
+2.004002 - 2020-11-20
+  - no changes
+  - releasing as stable
+
+2.004_001 - 2020-07-30
+  - remove Module::Runtime prerequisite
+  - internal code cleanups
+  - added test for conflicts in extensions wrapping 'has' and similar subs
+
 2.004000 - 2020-04-09
   - minor documentation tweaks
   - minor test tweaks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/MANIFEST new/Moo-2.004003/MANIFEST
--- old/Moo-2.004000/MANIFEST   2020-04-09 19:57:05.000000000 +0200
+++ new/Moo-2.004003/MANIFEST   2020-11-21 05:05:21.000000000 +0100
@@ -86,6 +86,7 @@
 t/not-methods.t
 t/overloaded-coderefs.t
 t/overridden-core-funcs.t
+t/role-conflicts-moox.t
 t/strictures.t
 t/sub-and-handles.t
 t/subconstructor.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/META.json new/Moo-2.004003/META.json
--- old/Moo-2.004000/META.json  2020-04-09 19:57:03.000000000 +0200
+++ new/Moo-2.004003/META.json  2020-11-21 05:05: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.44, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.50, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "perl_5"
    ],
@@ -52,7 +52,6 @@
          "requires" : {
             "Class::Method::Modifiers" : "1.10",
             "Exporter" : "5.57",
-            "Module::Runtime" : "0.014",
             "Role::Tiny" : "2.001004",
             "Scalar::Util" : "1.00",
             "Sub::Defer" : "2.006006",
@@ -87,7 +86,7 @@
       },
       "x_IRC" : "irc://irc.perl.org/#moose"
    },
-   "version" : "2.004000",
+   "version" : "2.004003",
    "x_authority" : "cpan:MSTROUT",
    "x_breaks" : {
       "App::Commando" : "<= 0.012",
@@ -103,5 +102,5 @@
          "use_warnings" : "internal module used to apply warnings"
       }
    },
-   "x_serialization_backend" : "JSON::PP version 4.04"
+   "x_serialization_backend" : "JSON::PP version 4.05"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/META.yml new/Moo-2.004003/META.yml
--- old/Moo-2.004000/META.yml   2020-04-09 19:57:02.000000000 +0200
+++ new/Moo-2.004003/META.yml   2020-11-21 05:05:17.000000000 +0100
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.50, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,7 +25,6 @@
 requires:
   Class::Method::Modifiers: '1.10'
   Exporter: '5.57'
-  Module::Runtime: '0.014'
   Role::Tiny: '2.001004'
   Scalar::Util: '1.00'
   Sub::Defer: '2.006006'
@@ -36,7 +35,7 @@
   bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Moo
   license: https://dev.perl.org/licenses/
   repository: https://github.com/moose/Moo.git
-version: '2.004000'
+version: '2.004003'
 x_authority: cpan:MSTROUT
 x_breaks:
   App::Commando: '<= 0.012'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/Makefile.PL new/Moo-2.004003/Makefile.PL
--- old/Moo-2.004000/Makefile.PL        2020-04-08 10:06:59.000000000 +0200
+++ new/Moo-2.004003/Makefile.PL        2020-09-02 12:16:19.000000000 +0200
@@ -24,7 +24,6 @@
     runtime => {
       requires => {
         'Class::Method::Modifiers'  => '1.10',  # for RT#80194
-        'Module::Runtime'           => '0.014', # for RT#86394
         'Role::Tiny'                => '2.001004',
         'Scalar::Util'              => '1.00',
         'perl'                      => '5.006',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/lib/Method/Generate/Accessor.pm 
new/Moo-2.004003/lib/Method/Generate/Accessor.pm
--- old/Moo-2.004000/lib/Method/Generate/Accessor.pm    2020-04-08 
10:49:03.000000000 +0200
+++ new/Moo-2.004003/lib/Method/Generate/Accessor.pm    2020-09-02 
12:16:19.000000000 +0200
@@ -1,7 +1,7 @@
 package Method::Generate::Accessor;
 
 use Moo::_strictures;
-use Moo::_Utils qw(_load_module _maybe_load_module _install_coderef);
+use Moo::_Utils qw(_load_module _maybe_load_module _install_coderef 
_module_name_rx);
 use Moo::Object ();
 BEGIN { our @ISA = qw(Moo::Object) }
 use Sub::Quote qw(quote_sub quoted_from_sub quotify sanitize_identifier);
@@ -30,10 +30,7 @@
   $Carp::Internal{+__PACKAGE__} = 1;
 }
 
-my $module_name_only = qr/\A$Module::Runtime::module_name_rx\z/;
-
-sub _die_overwrite
-{
+sub _die_overwrite {
   my ($pkg, $method, $type) = @_;
   croak "You cannot overwrite a locally defined method ($method) with "
     . ( $type || 'an accessor' );
@@ -72,7 +69,7 @@
     }
     $spec->{builder} = '_build_'.$name if ($spec->{builder}||0) eq 1;
     croak "Invalid builder for $into->$name - not a valid method name"
-      if $spec->{builder} !~ $module_name_only;
+      if $spec->{builder} !~ _module_name_rx;
   }
   if (($spec->{predicate}||0) eq 1) {
     $spec->{predicate} = $name =~ /^_/ ? "_has${name}" : "has_${name}";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/lib/Moo/Role.pm 
new/Moo-2.004003/lib/Moo/Role.pm
--- old/Moo-2.004000/lib/Moo/Role.pm    2020-04-09 17:51:40.000000000 +0200
+++ new/Moo-2.004003/lib/Moo/Role.pm    2020-11-21 05:03:06.000000000 +0100
@@ -25,7 +25,7 @@
   );
 }
 
-our $VERSION = '2.004000';
+our $VERSION = '2.004003';
 $VERSION =~ tr/_//d;
 
 require Moo::sification;
@@ -357,12 +357,12 @@
   my $class = ref $new;
   _set_loaded($class, (caller)[1]);
 
-  my $apply_defaults = exists $APPLY_DEFAULTS{$class} ? $APPLY_DEFAULTS{$class}
-    : $APPLY_DEFAULTS{$class} = do {
-    my %attrs = map { @{$INFO{$_}{attributes}||[]} } @roles;
+  my $apply_defaults = $APPLY_DEFAULTS{$class};
+  if (!defined $apply_defaults) {
+    my $attrs = { map @{$INFO{$_}{attributes}||[]}, @roles };
 
     if ($INC{'Moo.pm'}
-        and keys %attrs
+        and keys %$attrs
         and my $con_gen = Moo->_constructor_maker_for($class)
         and my $m = Moo->_accessor_maker_for($class)) {
 
@@ -386,11 +386,11 @@
           else {
             ();
           }
-        } sort keys %attrs ),
+        } sort keys %$attrs ),
       );
       if ($code) {
         require Sub::Quote;
-        Sub::Quote::quote_sub(
+        $apply_defaults = Sub::Quote::quote_sub(
           "${class}::_apply_defaults",
           "no warnings 'void';\n$code",
           \%captures,
@@ -400,14 +400,10 @@
           }
         );
       }
-      else {
-        0;
-      }
-    }
-    else {
-      0;
     }
-  };
+    $APPLY_DEFAULTS{$class} = $apply_defaults ||= 0;
+  }
+
   if ($apply_defaults) {
     local $Carp::Internal{+__PACKAGE__} = 1;
     local $Carp::Internal{$class} = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/lib/Moo/_Utils.pm 
new/Moo-2.004003/lib/Moo/_Utils.pm
--- old/Moo-2.004000/lib/Moo/_Utils.pm  2020-04-08 14:03:38.000000000 +0200
+++ new/Moo-2.004003/lib/Moo/_Utils.pm  2020-11-21 04:59:30.000000000 +0100
@@ -18,9 +18,15 @@
             : $sn ? \&Sub::Name::subname
             : sub { $_[1] };
   *_CAN_SUBNAME = ($su || $sn) ? sub(){1} : sub(){0};
-}
 
-use Module::Runtime qw(use_package_optimistically module_notional_filename);
+  *_WORK_AROUND_BROKEN_MODULE_STATE = "$]" < 5.009 ? sub(){1} : sub(){0};
+  *_WORK_AROUND_HINT_LEAKAGE
+    = "$]" < 5.011 && !("$]" >= 5.009004 && "$]" < 5.010001)
+      ? sub(){1} : sub(){0};
+
+  my $module_name_rx = qr/\A(?!\d)\w+(?:::\w+)*\z/;
+  *_module_name_rx = sub(){$module_name_rx};
+}
 
 use Exporter qw(import);
 use Config;
@@ -42,6 +48,7 @@
   _install_tracked
   _load_module
   _maybe_load_module
+  _module_name_rx
   _name_coderef
   _set_loaded
   _unimport_coderefs
@@ -88,22 +95,50 @@
   _install_coderef("${target}::${name}", "${from}::${name}", $code);
 }
 
+sub Moo::_Util::__GUARD__::DESTROY {
+  delete $INC{$_[0]->[0]} if @{$_[0]};
+}
+
+sub _require {
+  my ($file) = @_;
+  my $guard = _WORK_AROUND_BROKEN_MODULE_STATE
+    && bless([ $file ], 'Moo::_Util::__GUARD__');
+  local %^H if _WORK_AROUND_HINT_LEAKAGE;
+  if (!eval { require $file; 1 }) {
+    my $e = $@ || "Can't locate $file";
+    my $me = __FILE__;
+    $e =~ s{ at \Q$me\E line \d+\.\n\z}{};
+    return $e;
+  }
+  pop @$guard if _WORK_AROUND_BROKEN_MODULE_STATE;
+  return undef;
+}
+
 sub _load_module {
-  my $module = $_[0];
-  my $file = eval { module_notional_filename($module) } or croak $@;
-  use_package_optimistically($module);
+  my ($module) = @_;
+  croak qq{"$module" is not a module name!}
+    unless $module =~ _module_name_rx;
+  (my $file = "$module.pm") =~ s{::}{/}g;
   return 1
     if $INC{$file};
-  my $error = $@ || "Can't locate $file";
+
+  my $e = _require $file;
+  return 1
+    if !defined $e;
+
+  croak $e
+    if $e !~ /\ACan't locate \Q$file\E /;
 
   # can't just ->can('can') because a sub-package Foo::Bar::Baz
   # creates a 'Baz::' key in Foo::Bar's symbol table
   my $stash = _getstash($module)||{};
-  return 1 if grep +(ref($_) || *$_{CODE}), values %$stash;
+  no strict 'refs';
+  return 1 if grep +exists &{"${module}::$_"}, grep !/::\z/, keys %$stash;
   return 1
     if $INC{"Moose.pm"} && Class::MOP::class_of($module)
     or Mouse::Util->can('find_meta') && Mouse::Util::find_meta($module);
-  croak $error;
+
+  croak $e;
 }
 
 our %MAYBE_LOADED;
@@ -111,17 +146,21 @@
   my $module = $_[0];
   return $MAYBE_LOADED{$module}
     if exists $MAYBE_LOADED{$module};
-  if(! eval { use_package_optimistically($module) }) {
-    warn "$module exists but failed to load with error: $@";
-  }
-  elsif ( $INC{module_notional_filename($module)} ) {
+  (my $file = "$module.pm") =~ s{::}{/}g;
+
+  my $e = _require $file;
+  if (!defined $e) {
     return $MAYBE_LOADED{$module} = 1;
   }
+  elsif ($e !~ /\ACan't locate \Q$file\E /) {
+    warn "$module exists but failed to load with error: $e";
+  }
   return $MAYBE_LOADED{$module} = 0;
 }
 
 sub _set_loaded {
-  $INC{Module::Runtime::module_notional_filename($_[0])} ||= $_[1];
+  (my $file = "$_[0].pm") =~ s{::}{/}g;
+  $INC{$file} ||= $_[1];
 }
 
 sub _install_coderef {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/lib/Moo.pm new/Moo-2.004003/lib/Moo.pm
--- old/Moo-2.004000/lib/Moo.pm 2020-04-09 17:51:40.000000000 +0200
+++ new/Moo-2.004003/lib/Moo.pm 2020-11-21 05:03:06.000000000 +0100
@@ -24,7 +24,7 @@
   );
 }
 
-our $VERSION = '2.004000';
+our $VERSION = '2.004003';
 $VERSION =~ tr/_//d;
 
 require Moo::sification;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/maint/Makefile.PL.include 
new/Moo-2.004003/maint/Makefile.PL.include
--- old/Moo-2.004000/maint/Makefile.PL.include  2020-04-08 10:06:59.000000000 
+0200
+++ new/Moo-2.004003/maint/Makefile.PL.include  2020-11-20 16:59:52.000000000 
+0100
@@ -1,4 +1,4 @@
-BEGIN { -e 'Distar' or system("git clone 
git://git.shadowcat.co.uk/p5sagit/Distar.git") }
+BEGIN { -e 'Distar' or system("git clone 
https://github.com/p5sagit/Distar.git";) }
 use lib 'Distar/lib';
 use Distar 0.001;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/t/load_module.t 
new/Moo-2.004003/t/load_module.t
--- old/Moo-2.004000/t/load_module.t    2020-04-08 10:06:59.000000000 +0200
+++ new/Moo-2.004003/t/load_module.t    2020-10-28 13:43:20.000000000 +0100
@@ -10,6 +10,13 @@
     sub baz { 1 }
     1;
   },
+  'BrokenModule' => q{
+    package BrokenModule;
+    use strict;
+    sub guff { 1 }
+
+    ;_;
+  },
 );
 
 { package Foo::Bar::Baz; sub quux { } }
@@ -18,4 +25,7 @@
 
 ok(eval { Foo::Bar->baz }, 'Loaded module ok');
 
+ok do { my $e; eval { _load_module("BrokenModule"); 1 } or $e = $@; $e },
+  'broken module that installs subs gives error';
+
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/t/role-conflicts-moox.t 
new/Moo-2.004003/t/role-conflicts-moox.t
--- old/Moo-2.004000/t/role-conflicts-moox.t    1970-01-01 01:00:00.000000000 
+0100
+++ new/Moo-2.004003/t/role-conflicts-moox.t    2020-09-02 12:16:19.000000000 
+0200
@@ -0,0 +1,43 @@
+use Moo::_strictures;
+use Test::More;
+use Test::Fatal;
+
+{
+  package MooX::ExtendHas;
+  BEGIN { $INC{'MooX/ExtendHas.pm'} = __FILE__ }
+  use Moo::_Utils qw(_install_modifier);
+  sub import {
+    my $target = caller;
+    _install_modifier $target, 'around', 'has', sub {
+      my $orig = shift;
+      $orig->(@_);
+    };
+  }
+}
+
+{
+  package MyClass;
+  use Moo;
+}
+
+{
+  package MyRole1;
+  use Moo::Role;
+  use MooX::ExtendHas;
+
+  has foo => (is => "ro");
+}
+
+{
+  package MyRole2;
+  use Moo::Role;
+  use MooX::ExtendHas;
+
+  has bar => (is => "ro");
+}
+
+is exception {
+  Moo::Role->create_class_with_roles('MyClass', qw(MyRole1 MyRole2))
+}, undef, "extending has in roles doesn't cause conflicts";
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Moo-2.004000/xt/inflate-our-classes.t 
new/Moo-2.004003/xt/inflate-our-classes.t
--- old/Moo-2.004000/xt/inflate-our-classes.t   2020-04-08 10:06:59.000000000 
+0200
+++ new/Moo-2.004003/xt/inflate-our-classes.t   2020-09-02 12:16:19.000000000 
+0200
@@ -3,7 +3,6 @@
 use Test::Fatal;
 
 use Moo::HandleMoose;
-use Module::Runtime qw(use_module);
 
 foreach my $class (qw(
   Method::Generate::Accessor
@@ -15,7 +14,9 @@
   local $SIG{__WARN__} = sub { push @warnings, $_[0] };
 
   is exception {
-    Moo::HandleMoose::inject_real_metaclass_for(use_module($class))
+    (my $file = "$class.pm") =~ s{::}{/}g;
+    require $file;
+    Moo::HandleMoose::inject_real_metaclass_for($class);
   }, undef,
     "No exceptions inflating $class";
   ok !@warnings, "No warnings inflating $class"
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to