From c9b339b2b0b6cb69599921e9269cc0a16e9cc448 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Wed, 14 May 2025 18:31:59 +0200
Subject: [PATCH 1/2] typemap patched for perl 5.41.x (RT #156069)

Patch by LEONT.
See also BBC https://github.com/Perl/perl5/issues/22353
---
 typemap | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/typemap b/typemap
index f30badc..ea5c33b 100644
--- a/typemap
+++ b/typemap
@@ -37,9 +37,9 @@ T_LOOP
 
 T_WATCHER
 	if (!(SvROK ($arg) && SvOBJECT (SvRV ($arg))
-              && (SvSTASH (SvRV ($arg)) == stash_" . ($type =~ /ev_(\S+)/, "$1") . "
-                  || sv_derived_from ($arg, \"EV::" . ($type =~ /ev_(\S+)/, ucfirst "$1") . "\"))))
-          croak (\"object is not of type EV::" . ($type =~ /ev_(\S+)/, ucfirst "$1") . "\");
+              && (SvSTASH (SvRV ($arg)) == stash_${ ($type =~ /ev_(\S+)/, \"$1") }
+                  || sv_derived_from ($arg, \"EV::${ ($type =~ /ev_(\S+)/, \ucfirst "$1") }\"))))
+          croak (\"object is not of type EV::${ ($type =~ /ev_(\S+)/, \ucfirst "$1") }\");
 	$var = ($type)SvPVX (SvRV ($arg));
 
 OUTPUT
-- 
2.11.0


From 0c8dd70b4cc6ea5d282f60f759cb803560353e17 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Wed, 14 May 2025 19:42:32 +0200
Subject: [PATCH 2/2] typemap patch needs newer ExtUtils::ParseXS

---
 META.json   | 9 +++++----
 META.yml    | 5 +++--
 Makefile.PL | 2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/META.json b/META.json
index 3580136..46bc1ad 100644
--- a/META.json
+++ b/META.json
@@ -4,13 +4,13 @@
       "unknown"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.74, CPAN::Meta::Converter version 2.150010",
    "license" : [
       "unknown"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
-      "version" : "2"
+      "version" : 2
    },
    "name" : "EV",
    "no_index" : {
@@ -28,7 +28,8 @@
       "configure" : {
          "requires" : {
             "Canary::Stability" : "0",
-            "ExtUtils::MakeMaker" : "6.52"
+            "ExtUtils::MakeMaker" : "6.52",
+            "ExtUtils::ParseXS" : "3.57"
          }
       },
       "runtime" : {
@@ -39,5 +40,5 @@
    },
    "release_status" : "stable",
    "version" : "4.34",
-   "x_serialization_backend" : "JSON::PP version 2.27300"
+   "x_serialization_backend" : "JSON::PP version 4.16"
 }
diff --git a/META.yml b/META.yml
index 74acc97..1968a4e 100644
--- a/META.yml
+++ b/META.yml
@@ -7,8 +7,9 @@ build_requires:
 configure_requires:
   Canary::Stability: '0'
   ExtUtils::MakeMaker: '6.52'
+  ExtUtils::ParseXS: '3.57'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.74, CPAN::Meta::Converter version 2.150010'
 license: unknown
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,4 +22,4 @@ no_index:
 requires:
   common::sense: '0'
 version: '4.34'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.012'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.020'
diff --git a/Makefile.PL b/Makefile.PL
index 680dda9..a7c4bc8 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -422,7 +422,7 @@ WriteMakefile(
        @anyevent,
        "common::sense" => 0,
     },
-    CONFIGURE_REQUIRES => { "ExtUtils::MakeMaker" => 6.52, "Canary::Stability" => 0 },
+    CONFIGURE_REQUIRES => { "ExtUtils::MakeMaker" => 6.52, "Canary::Stability" => 0, "ExtUtils::ParseXS" => 3.57 },
     VERSION_FROM => "EV.pm",
     PM           => {
 		    'EV.pm'		=> '$(INST_LIB)/EV.pm',
-- 
2.11.0