Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Test-MockModule for 
openSUSE:Factory checked in at 2026-06-17 16:27:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-MockModule (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Test-MockModule.new.1981 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Test-MockModule"

Wed Jun 17 16:27:32 2026 rev:21 rq:1360007 version:0.185.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Test-MockModule/perl-Test-MockModule.changes    
    2026-06-08 14:22:55.195085445 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Test-MockModule.new.1981/perl-Test-MockModule.changes
      2026-06-17 16:29:00.153838521 +0200
@@ -1,0 +2,13 @@
+Tue Jun 16 10:22:59 UTC 2026 - Tina Müller <[email protected]>
+
+- updated to 0.185.3 (v0.185.3)
+   see /usr/share/doc/packages/perl-Test-MockModule/Changes
+
+  ## 0.185.3 — 2026-06-15
+
+  ## What's Changed
+  * Fix/93 moo meta no moose by @geofffranks in 
https://github.com/geofffranks/test-mockmodule/pull/94
+
+  **Full Changelog**: 
https://github.com/geofffranks/test-mockmodule/compare/0.185.2...0.185.3
+
+-------------------------------------------------------------------

Old:
----
  Test-MockModule-v0.185.2.tar.gz

New:
----
  Test-MockModule-v0.185.3.tar.gz

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

Other differences:
------------------
++++++ perl-Test-MockModule.spec ++++++
--- /var/tmp/diff_new_pack.xxt3rv/_old  2026-06-17 16:29:00.865868164 +0200
+++ /var/tmp/diff_new_pack.xxt3rv/_new  2026-06-17 16:29:00.865868164 +0200
@@ -18,10 +18,10 @@
 
 %define cpan_name Test-MockModule
 Name:           perl-Test-MockModule
-Version:        0.185.2
+Version:        0.185.3
 Release:        0
-# v0.185.2 -> normalize -> 0.185.2
-%define cpan_version v0.185.2
+# v0.185.3 -> normalize -> 0.185.3
+%define cpan_version v0.185.3
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Override subroutines in a module for unit testing
 URL:            https://metacpan.org/release/%{cpan_name}
@@ -37,6 +37,7 @@
 BuildRequires:  perl(Test::Warnings)
 Requires:       perl(SUPER) >= 1.200
 Recommends:     perl(Class::Load)
+Recommends:     perl(Moo)
 Recommends:     perl(Moose)
 Recommends:     perl(Mouse)
 Recommends:     perl(Test::Exception)

++++++ Test-MockModule-v0.185.2.tar.gz -> Test-MockModule-v0.185.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/Build.PL 
new/Test-MockModule-v0.185.3/Build.PL
--- old/Test-MockModule-v0.185.2/Build.PL       2026-05-29 23:37:05.000000000 
+0200
+++ new/Test-MockModule-v0.185.3/Build.PL       2026-06-16 00:35:55.000000000 
+0200
@@ -47,8 +47,9 @@
                'Test::Warnings'      => 0,
        },
        # Moose, Mouse, Class::Load and Test::Exception are exercised ONLY by 
the
-       # t/moose_*.t and t/mouse_*.t MOP-integration tests added for GH #55. 
Each
-       # of those files opens with `eval { require Moose } or plan skip_all`, 
so
+       # t/moose_*.t and t/mouse_*.t MOP-integration tests added for GH #55, 
and
+       # Moo only by the t/moo_*.t tests added for GH #93. Each of those files
+       # opens with an `eval { require <Module> } or plan skip_all`, so
        # the suite passes cleanly without them. They are therefore OPTIONAL, 
not
        # required: declaring them as `recommends` keeps a plain
        # `cpanm Test::MockModule` from dragging in two full Perl OO systems 
(GH #90).
@@ -65,6 +66,7 @@
                'Class::Load'         => 0,
                'Moose'               => 0,
                'Mouse'               => 0,
+               'Moo'                 => 0,
        },
 
        add_to_cleanup => [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/Changes 
new/Test-MockModule-v0.185.3/Changes
--- old/Test-MockModule-v0.185.2/Changes        2026-05-29 23:37:05.000000000 
+0200
+++ new/Test-MockModule-v0.185.3/Changes        2026-06-16 00:35:55.000000000 
+0200
@@ -1,3 +1,11 @@
+## 0.185.3 — 2026-06-15
+
+## What's Changed
+* Fix/93 moo meta no moose by @geofffranks in 
https://github.com/geofffranks/test-mockmodule/pull/94
+
+
+**Full Changelog**: 
https://github.com/geofffranks/test-mockmodule/compare/0.185.2...0.185.3
+
 ## 0.185.2 — 2026-05-29
 
 ## What's Changed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/MANIFEST 
new/Test-MockModule-v0.185.3/MANIFEST
--- old/Test-MockModule-v0.185.2/MANIFEST       2026-05-29 23:37:05.000000000 
+0200
+++ new/Test-MockModule-v0.185.3/MANIFEST       2026-06-16 00:35:55.000000000 
+0200
@@ -26,6 +26,8 @@
 t/mock_all.t
 t/mock_strict.t
 t/mockmodule.t
+t/moo_basic.t
+t/moo_meta_for.t
 t/moose_around.t
 t/moose_immutable.t
 t/moose_meta_for.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/META.json 
new/Test-MockModule-v0.185.3/META.json
--- old/Test-MockModule-v0.185.2/META.json      2026-05-29 23:37:05.000000000 
+0200
+++ new/Test-MockModule-v0.185.3/META.json      2026-06-16 00:35:55.000000000 
+0200
@@ -23,6 +23,7 @@
       "runtime" : {
          "recommends" : {
             "Class::Load" : "0",
+            "Moo" : "0",
             "Moose" : "0",
             "Mouse" : "0",
             "Test::Exception" : "0"
@@ -44,7 +45,7 @@
    "provides" : {
       "Test::MockModule" : {
          "file" : "lib/Test/MockModule.pm",
-         "version" : "v0.185.2"
+         "version" : "v0.185.3"
       }
    },
    "release_status" : "stable",
@@ -60,6 +61,6 @@
          "url" : "git://github.com/geofffranks/test-mockmodule.git"
       }
    },
-   "version" : "v0.185.2",
+   "version" : "v0.185.3",
    "x_serialization_backend" : "JSON::PP version 4.16"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/META.yml 
new/Test-MockModule-v0.185.3/META.yml
--- old/Test-MockModule-v0.185.2/META.yml       2026-05-29 23:37:05.000000000 
+0200
+++ new/Test-MockModule-v0.185.3/META.yml       2026-06-16 00:35:55.000000000 
+0200
@@ -18,9 +18,10 @@
 provides:
   Test::MockModule:
     file: lib/Test/MockModule.pm
-    version: v0.185.2
+    version: v0.185.3
 recommends:
   Class::Load: '0'
+  Moo: '0'
   Moose: '0'
   Mouse: '0'
   Test::Exception: '0'
@@ -34,5 +35,5 @@
   homepage: https://github.com/geofffranks/test-mockmodule
   license: http://dev.perl.org/licenses/
   repository: git://github.com/geofffranks/test-mockmodule.git
-version: v0.185.2
+version: v0.185.3
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/lib/Test/MockModule.pm 
new/Test-MockModule-v0.185.3/lib/Test/MockModule.pm
--- old/Test-MockModule-v0.185.2/lib/Test/MockModule.pm 2026-05-29 
23:37:05.000000000 +0200
+++ new/Test-MockModule-v0.185.3/lib/Test/MockModule.pm 2026-06-16 
00:35:55.000000000 +0200
@@ -6,7 +6,7 @@
 use Carp;
 use SUPER;
 # This is now auto-updated at release time by the github action
-$VERSION = '0.185.2';
+$VERSION = '0.185.3';
 
 our $GLOBAL_STRICT_MODE;
 
@@ -558,6 +558,11 @@
        return unless $package->can('meta');
        my $meta = eval { $package->meta };
        return unless ref $meta;
+       # Moo's ->meta returns a Moo::HandleMoose::FakeMetaClass whose ->isa 
lazily
+       # inflates a real Moose metaclass -- which throws when Moose isn't 
installed.
+       # Match it by exact ref (not ->isa) BEFORE the isa checks so inflation 
never
+       # fires; Moo classes fall back to plain symbol-table mocking. (GH #93)
+       return if ref($meta) eq 'Moo::HandleMoose::FakeMetaClass';
        return $meta if $meta->isa('Class::MOP::Class');   # Moose
        return $meta if $meta->isa('Mouse::Meta::Class');  # Mouse
        return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/t/moo_basic.t 
new/Test-MockModule-v0.185.3/t/moo_basic.t
--- old/Test-MockModule-v0.185.2/t/moo_basic.t  1970-01-01 01:00:00.000000000 
+0100
+++ new/Test-MockModule-v0.185.3/t/moo_basic.t  2026-06-16 00:35:55.000000000 
+0200
@@ -0,0 +1,52 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN {
+    eval { require Moo; 1 } or plan skip_all => "Moo not installed";
+}
+
+use Test::MockModule;
+
+{
+    package Issue93::MooClass; ## no critic 
(Modules::RequireFilenameMatchesPackage)
+    use Moo;
+    has answer => (is => 'ro', default => 42);
+    sub greet { 'real_greet' }
+}
+
+{
+    package Issue93::MooParent; ## no critic 
(Modules::RequireFilenameMatchesPackage)
+    use Moo;
+    sub bar { 'parent_bar' }
+}
+{
+    package Issue93::MooChild; ## no critic 
(Modules::RequireFilenameMatchesPackage)
+    use Moo;
+    extends 'Issue93::MooParent';
+}
+
+# Basic mock-and-call
+my $mock = Test::MockModule->new('Issue93::MooClass');
+$mock->mock( greet => sub { 'mocked_greet' } );
+is(Issue93::MooClass->new->greet, 'mocked_greet', "Moo mock visible");
+is(Issue93::MooClass->new->answer, 42, "Moo accessor unaffected by mock");
+
+$mock->unmock('greet');
+is(Issue93::MooClass->new->greet, 'real_greet', "Moo unmock restores 
original");
+
+# Moo-generated accessors are ordinary subs in the symbol table, so plain
+# replacement mocking must work on them too.
+$mock->mock( answer => sub { 99 } );
+is(Issue93::MooClass->new->answer, 99, "Moo accessor mock visible");
+$mock->unmock('answer');
+is(Issue93::MooClass->new->answer, 42, "Moo accessor unmock restores 
original");
+
+# Inherited method mock-and-restore
+my $imock = Test::MockModule->new('Issue93::MooChild');
+$imock->mock( bar => sub { 'mocked_bar' } );
+is(Issue93::MooChild->bar, 'mocked_bar', "Moo inherited mock visible");
+$imock->unmock('bar');
+is(Issue93::MooChild->bar, 'parent_bar', "Moo unmock falls through to parent");
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Test-MockModule-v0.185.2/t/moo_meta_for.t 
new/Test-MockModule-v0.185.3/t/moo_meta_for.t
--- old/Test-MockModule-v0.185.2/t/moo_meta_for.t       1970-01-01 
01:00:00.000000000 +0100
+++ new/Test-MockModule-v0.185.3/t/moo_meta_for.t       2026-06-16 
00:35:55.000000000 +0200
@@ -0,0 +1,36 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN {
+    eval { require Moo; 1 } or plan skip_all => "Moo not installed";
+}
+
+use Test::MockModule;
+
+# Plain (non-Moo) package
+{
+    package PlainPkg; ## no critic (Modules::RequireFilenameMatchesPackage)
+    sub new { bless {}, shift }
+}
+
+# Moo package
+{
+    package MooPkg; ## no critic (Modules::RequireFilenameMatchesPackage)
+    use Moo;
+    has answer => (is => 'ro', default => 42);
+    sub greet { 'real_greet' }
+}
+
+# A Moo class must NOT be treated as a Moose/Mouse MOP class: _meta_for
+# returns undef so mocking falls back to plain symbol-table replacement.
+# Pre-fix this either returns a truthy Moo::HandleMoose::FakeMetaClass
+# (Moose installed) or throws inside Moo::HandleMoose (Moose absent).
+is(Test::MockModule::_meta_for('MooPkg'), undef, "Moo package returns undef 
meta");
+
+is(Test::MockModule::_meta_for('PlainPkg'), undef, "plain package returns 
undef");
+is(Test::MockModule::_meta_for(undef), undef, "undef package returns undef");
+is(Test::MockModule::_meta_for(''), undef, "empty package returns undef");
+is(Test::MockModule::_meta_for('Does::Not::Exist'), undef, "nonexistent 
package returns undef");
+
+done_testing;

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.xxt3rv/_old  2026-06-17 16:29:01.033875159 +0200
+++ /var/tmp/diff_new_pack.xxt3rv/_new  2026-06-17 16:29:01.037875326 +0200
@@ -1,6 +1,6 @@
-mtime: 1780127574
-commit: d9c5974a3c541d52f04b1178f9e480dc2cae3c4776dee8751d2c8948a6ab1cba
+mtime: 1781605380
+commit: 68906c4af1f5f25d74025c826bc6ff74593057e76821f53ad880d34d0cd5936a
 url: https://src.opensuse.org/perl/perl-Test-MockModule
-revision: d9c5974a3c541d52f04b1178f9e480dc2cae3c4776dee8751d2c8948a6ab1cba
+revision: 68906c4af1f5f25d74025c826bc6ff74593057e76821f53ad880d34d0cd5936a
 projectscmsync: https://src.opensuse.org/perl/_ObsPrj
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-06-16 12:23:00.000000000 +0200
@@ -0,0 +1 @@
+.osc

Reply via email to