Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-YAML-PP for openSUSE:Factory 
checked in at 2026-05-05 15:14:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-YAML-PP (Old)
 and      /work/SRC/openSUSE:Factory/.perl-YAML-PP.new.30200 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-YAML-PP"

Tue May  5 15:14:35 2026 rev:23 rq:1350771 version:0.40.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-YAML-PP/perl-YAML-PP.changes        
2025-02-11 21:22:29.584964101 +0100
+++ /work/SRC/openSUSE:Factory/.perl-YAML-PP.new.30200/perl-YAML-PP.changes     
2026-05-05 15:14:39.697424716 +0200
@@ -1,0 +2,11 @@
+Fri Apr 24 16:10:36 UTC 2026 - Tina Müller <[email protected]>
+
+- updated to 0.40.0 (v0.40.0)
+   see /usr/share/doc/packages/perl-YAML-PP/Changes
+
+  v0.40.0 2026-04-24 16:51:28+02:00
+
+      - Security: Limit default allowed maximum nesting level.
+        Set it via new option 'max_depth'.
+
+-------------------------------------------------------------------

Old:
----
  YAML-PP-v0.39.0.tar.gz

New:
----
  README.md
  YAML-PP-v0.40.0.tar.gz
  _scmsync.obsinfo
  build.specials.obscpio

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

Other differences:
------------------
++++++ perl-YAML-PP.spec ++++++
--- /var/tmp/diff_new_pack.1fCiZl/_old  2026-05-05 15:14:40.569460826 +0200
+++ /var/tmp/diff_new_pack.1fCiZl/_new  2026-05-05 15:14:40.573460992 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-YAML-PP
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,16 @@
 
 %define cpan_name YAML-PP
 Name:           perl-YAML-PP
-Version:        0.39.0
+Version:        0.40.0
 Release:        0
-# v0.39.0 -> normalize -> 0.39.0
-%define cpan_version v0.39.0
+# v0.40.0 -> normalize -> 0.40.0
+%define cpan_version v0.40.0
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        YAML 1.2 Processor
 URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/T/TI/TINITA/%{cpan_name}-%{cpan_version}.tar.gz
 Source1:        cpanspec.yml
+Source100:      README.md
 BuildArch:      noarch
 BuildRequires:  perl
 BuildRequires:  perl-macros
@@ -76,6 +77,6 @@
 %perl_gen_filelist
 
 %files -f %{name}.files
-%doc Changes CONTRIBUTING.md examples Makefile.dev README.md
+%doc Changes CONTRIBUTING.md examples Makefile.dev README.md SECURITY.md
 %license LICENSE
 

++++++ README.md ++++++

## Build Results

Current state of perl in openSUSE:Factory is

![Factory build 
results](https://br.opensuse.org/status/openSUSE:Factory/perl-YAML-PP/standard)

The current state of perl in the devel project build (devel:languages:perl)

![Devel project build 
results](https://br.opensuse.org/status/devel:languages:perl/perl-YAML-PP)



++++++ YAML-PP-v0.39.0.tar.gz -> YAML-PP-v0.40.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/Changes new/YAML-PP-v0.40.0/Changes
--- old/YAML-PP-v0.39.0/Changes 2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/Changes 2026-04-24 17:04:56.898849020 +0200
@@ -1,5 +1,10 @@
 Revision history for Perl module YAML::PP
 
+v0.40.0 2026-04-24 16:51:28+02:00
+
+    - Security: Limit default allowed maximum nesting level.
+      Set it via new option 'max_depth'.
+
 v0.39.0 2025-02-10 00:01:45+01:00
 
     - Allow unknown tags again, reverting the previous change in v0.38.1 which
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/LICENSE new/YAML-PP-v0.40.0/LICENSE
--- old/YAML-PP-v0.39.0/LICENSE 2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/LICENSE 2026-04-24 17:04:56.898727776 +0200
@@ -22,7 +22,7 @@
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+                    <https://fsf.org/>
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
@@ -236,8 +236,7 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 
USA
+    along with this program; if not, see <https://www.gnu.org/licenses/>.
 
 
 Also add information on how to contact you by electronic and paper mail.
@@ -264,8 +263,8 @@
   program `Gnomovision' (a program to direct compilers to make passes
   at assemblers) written by James Hacker.
 
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
+  <signature of Moe Ghoul>, 1 April 1989
+  Moe Ghoul, President of Vice
 
 That's all there is to it!
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/MANIFEST new/YAML-PP-v0.40.0/MANIFEST
--- old/YAML-PP-v0.39.0/MANIFEST        2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/MANIFEST        2026-04-24 17:04:56.899081313 +0200
@@ -9,6 +9,7 @@
 Makefile.PL
 Makefile.dev
 README.md
+SECURITY.md
 bin/yamlpp-events
 bin/yamlpp-highlight
 bin/yamlpp-load
@@ -107,6 +108,7 @@
 t/55.flow.t
 t/56.force-flow.t
 t/57.dup-keys.t
+t/58.max-depth.t
 t/data/include/circular1.yaml
 t/data/include/circular2.yaml
 t/data/include/include.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/META.json 
new/YAML-PP-v0.40.0/META.json
--- old/YAML-PP-v0.39.0/META.json       2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/META.json       2026-04-24 17:04:56.899397346 +0200
@@ -61,143 +61,142 @@
             "IPC::Open3" : "0",
             "Test::More" : "0.98",
             "Test::Warn" : "0",
-            "lib" : "0",
-            "perl" : "v5.8.0"
+            "lib" : "0"
          }
       }
    },
    "provides" : {
       "YAML::PP" : {
          "file" : "lib/YAML/PP.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Common" : {
          "file" : "lib/YAML/PP/Common.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Constructor" : {
          "file" : "lib/YAML/PP/Constructor.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Dumper" : {
          "file" : "lib/YAML/PP/Dumper.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Emitter" : {
          "file" : "lib/YAML/PP/Emitter.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Exception" : {
          "file" : "lib/YAML/PP/Exception.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Grammar" : {
          "file" : "lib/YAML/PP/Grammar.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Highlight" : {
          "file" : "lib/YAML/PP/Highlight.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Lexer" : {
          "file" : "lib/YAML/PP/Lexer.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Loader" : {
          "file" : "lib/YAML/PP/Loader.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Parser" : {
          "file" : "lib/YAML/PP/Parser.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Perl" : {
          "file" : "lib/YAML/PP/Perl.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Preserve::Array" : {
          "file" : "lib/YAML/PP.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Preserve::Hash" : {
          "file" : "lib/YAML/PP.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Preserve::Scalar" : {
          "file" : "lib/YAML/PP.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Reader" : {
          "file" : "lib/YAML/PP/Reader.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Reader::File" : {
          "file" : "lib/YAML/PP/Reader.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Render" : {
          "file" : "lib/YAML/PP/Render.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Representer" : {
          "file" : "lib/YAML/PP/Representer.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema" : {
          "file" : "lib/YAML/PP/Schema.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Binary" : {
          "file" : "lib/YAML/PP/Schema/Binary.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Catchall" : {
          "file" : "lib/YAML/PP/Schema/Catchall.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Core" : {
          "file" : "lib/YAML/PP/Schema/Core.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Failsafe" : {
          "file" : "lib/YAML/PP/Schema/Failsafe.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Include" : {
          "file" : "lib/YAML/PP/Schema/Include.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::JSON" : {
          "file" : "lib/YAML/PP/Schema/JSON.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Merge" : {
          "file" : "lib/YAML/PP/Schema/Merge.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Perl" : {
          "file" : "lib/YAML/PP/Schema/Perl.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::Tie::IxHash" : {
          "file" : "lib/YAML/PP/Schema/Tie/IxHash.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Schema::YAML1_1" : {
          "file" : "lib/YAML/PP/Schema/YAML1_1.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Type::MergeKey" : {
          "file" : "lib/YAML/PP/Type/MergeKey.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Writer" : {
          "file" : "lib/YAML/PP/Writer.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       },
       "YAML::PP::Writer::File" : {
          "file" : "lib/YAML/PP/Writer/File.pm",
-         "version" : "v0.39.0"
+         "version" : "v0.40.0"
       }
    },
    "release_status" : "stable",
@@ -211,9 +210,9 @@
          "web" : "https://github.com/perlpunk/YAML-PP-p5";
       }
    },
-   "version" : "v0.39.0",
-   "x_generated_by_perl" : "v5.26.1",
-   "x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
+   "version" : "v0.40.0",
+   "x_generated_by_perl" : "v5.42.0",
+   "x_serialization_backend" : "Cpanel::JSON::XS version 4.38",
    "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/META.yml new/YAML-PP-v0.40.0/META.yml
--- old/YAML-PP-v0.39.0/META.yml        2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/META.yml        2026-04-24 17:04:56.898952945 +0200
@@ -11,7 +11,6 @@
   Test::More: '0.98'
   Test::Warn: '0'
   lib: '0'
-  perl: v5.8.0
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
@@ -24,103 +23,103 @@
 provides:
   YAML::PP:
     file: lib/YAML/PP.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Common:
     file: lib/YAML/PP/Common.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Constructor:
     file: lib/YAML/PP/Constructor.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Dumper:
     file: lib/YAML/PP/Dumper.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Emitter:
     file: lib/YAML/PP/Emitter.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Exception:
     file: lib/YAML/PP/Exception.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Grammar:
     file: lib/YAML/PP/Grammar.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Highlight:
     file: lib/YAML/PP/Highlight.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Lexer:
     file: lib/YAML/PP/Lexer.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Loader:
     file: lib/YAML/PP/Loader.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Parser:
     file: lib/YAML/PP/Parser.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Perl:
     file: lib/YAML/PP/Perl.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Preserve::Array:
     file: lib/YAML/PP.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Preserve::Hash:
     file: lib/YAML/PP.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Preserve::Scalar:
     file: lib/YAML/PP.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Reader:
     file: lib/YAML/PP/Reader.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Reader::File:
     file: lib/YAML/PP/Reader.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Render:
     file: lib/YAML/PP/Render.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Representer:
     file: lib/YAML/PP/Representer.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema:
     file: lib/YAML/PP/Schema.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Binary:
     file: lib/YAML/PP/Schema/Binary.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Catchall:
     file: lib/YAML/PP/Schema/Catchall.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Core:
     file: lib/YAML/PP/Schema/Core.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Failsafe:
     file: lib/YAML/PP/Schema/Failsafe.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Include:
     file: lib/YAML/PP/Schema/Include.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::JSON:
     file: lib/YAML/PP/Schema/JSON.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Merge:
     file: lib/YAML/PP/Schema/Merge.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Perl:
     file: lib/YAML/PP/Schema/Perl.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::Tie::IxHash:
     file: lib/YAML/PP/Schema/Tie/IxHash.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Schema::YAML1_1:
     file: lib/YAML/PP/Schema/YAML1_1.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Type::MergeKey:
     file: lib/YAML/PP/Type/MergeKey.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Writer:
     file: lib/YAML/PP/Writer.pm
-    version: v0.39.0
+    version: v0.40.0
   YAML::PP::Writer::File:
     file: lib/YAML/PP/Writer/File.pm
-    version: v0.39.0
+    version: v0.40.0
 requires:
   B: '0'
   B::Deparse: '0'
@@ -144,7 +143,7 @@
 resources:
   bugtracker: https://github.com/perlpunk/YAML-PP-p5/issues
   repository: https://github.com/perlpunk/YAML-PP-p5
-version: v0.39.0
-x_generated_by_perl: v5.26.1
-x_serialization_backend: 'YAML::Tiny version 1.74'
+version: v0.40.0
+x_generated_by_perl: v5.42.0
+x_serialization_backend: 'YAML::Tiny version 1.76'
 x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/Makefile.PL 
new/YAML-PP-v0.40.0/Makefile.PL
--- old/YAML-PP-v0.39.0/Makefile.PL     2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/Makefile.PL     2026-04-24 17:04:56.899487511 +0200
@@ -53,7 +53,7 @@
     "Test::Warn" => 0,
     "lib" => 0
   },
-  "VERSION" => "v0.39.0",
+  "VERSION" => "v0.40.0",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/SECURITY.md 
new/YAML-PP-v0.40.0/SECURITY.md
--- old/YAML-PP-v0.39.0/SECURITY.md     1970-01-01 01:00:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/SECURITY.md     2026-04-24 17:04:56.899575372 +0200
@@ -0,0 +1,13 @@
+# Reporting Security Issues
+
+To report a security issue, please use the GitHub Security Advisory "Report a
+Vulnerability" tab.
+
+The project maintainer(s) will send a response indicating the next steps in
+handling your report. After the initial reply to your report, the
+maintainer(s) will keep you informed of the progress towards a fix and full
+announcement, and may ask for additional information or guidance.
+
+Report security bugs in third-party packages to the person or team maintaining
+the package.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/dist.ini new/YAML-PP-v0.40.0/dist.ini
--- old/YAML-PP-v0.39.0/dist.ini        2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/dist.ini        2026-04-24 17:04:56.899211079 +0200
@@ -4,7 +4,7 @@
 copyright_holder = Tina Müller
 copyright_year   = 2025
 
-version = v0.39.0
+version = v0.40.0
 
 [@Filter]
 -bundle = @Basic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Common.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Common.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Common.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Common.pm   2026-04-24 17:04:56.914230138 
+0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Common;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use base 'Exporter';
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Constructor.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Constructor.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Constructor.pm      2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Constructor.pm      2026-04-24 
17:04:56.918578677 +0200
@@ -3,7 +3,7 @@
 use warnings;
 package YAML::PP::Constructor;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use YAML::PP;
 use YAML::PP::Common qw/
@@ -15,6 +15,8 @@
 use constant DEBUG => ($ENV{YAML_PP_LOAD_DEBUG} or $ENV{YAML_PP_LOAD_TRACE}) ? 
1 : 0;
 use constant TRACE => $ENV{YAML_PP_LOAD_TRACE} ? 1 : 0;
 
+use constant MAX_DEPTH => 2 ** 9;
+
 my %cyclic_refs = qw/ allow 1 ignore 1 warn 1 fatal 1 /;
 
 sub new {
@@ -26,6 +28,7 @@
         $duplicate_keys = 0;
     }
     my $require_footer = delete $args{require_footer};
+    my $max_depth = delete $args{max_depth} || MAX_DEPTH;
     my $preserve = delete $args{preserve} || 0;
     if ($preserve == 1) {
         $preserve = PRESERVE_ORDER | PRESERVE_SCALAR_STYLE | 
PRESERVE_FLOW_STYLE | PRESERVE_ALIAS;
@@ -46,6 +49,7 @@
         preserve => $preserve,
         duplicate_keys => $duplicate_keys,
         require_footer => $require_footer,
+        max_depth => $max_depth,
     }, $class;
     $self->init;
     return $self;
@@ -59,6 +63,7 @@
         default_yaml_version => $self->{default_yaml_version},
         cyclic_refs => $self->cyclic_refs,
         preserve => $self->{preserve},
+        max_depth => $self->{max_depth},
     };
     return bless $clone, ref $self;
 }
@@ -92,6 +97,7 @@
 sub preserve_alias { return $_[0]->{preserve} & PRESERVE_ALIAS }
 sub duplicate_keys { return $_[0]->{duplicate_keys} }
 sub require_footer { return $_[0]->{require_footer} }
+sub max_depth { return $_[0]->{max_depth} }
 
 sub document_start_event {
     my ($self, $event) = @_;
@@ -129,6 +135,15 @@
     $self->set_stack([]);
 }
 
+sub _check_depth {
+    my ($self) = @_;
+    my $stack = $self->stack;
+    my $c = @$stack;
+    if ($c > ($self->max_depth || MAX_DEPTH)){
+        croak sprintf 'Depth of nesting exceeds maximum %s', $self->max_depth;
+    }
+}
+
 sub mapping_start_event {
     my ($self, $event) = @_;
     my ($data, $on_data) = $self->schema->create_mapping($self, $event);
@@ -139,6 +154,7 @@
         event => $event,
         on_data => $on_data,
     };
+    $self->_check_depth;
     my $stack = $self->stack;
 
     my $preserve_order = $self->preserve_order;
@@ -241,6 +257,7 @@
         on_data => $on_data,
     };
     my $stack = $self->stack;
+    $self->_check_depth;
 
     my $preserve_style = $self->preserve_flow_style;
     my $preserve_alias = $self->preserve_alias;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Dumper.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Dumper.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Dumper.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Dumper.pm   2026-04-24 17:04:56.914018937 
+0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Dumper;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use Scalar::Util qw/ blessed refaddr reftype /;
 use YAML::PP;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Emitter.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Emitter.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Emitter.pm  2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Emitter.pm  2026-04-24 17:04:56.915149950 
+0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Emitter;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 use Data::Dumper;
 
 use YAML::PP::Common qw/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Exception.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Exception.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Exception.pm        2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Exception.pm        2026-04-24 
17:04:56.917385645 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Exception;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use overload '""' => \&to_string;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Grammar.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Grammar.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Grammar.pm  2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Grammar.pm  2026-04-24 17:04:56.915266026 
+0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Grammar;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use base 'Exporter';
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Highlight.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Highlight.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Highlight.pm        2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Highlight.pm        2026-04-24 
17:04:56.917475322 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Highlight;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 our @EXPORT_OK = qw/ Dump /;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Lexer.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Lexer.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Lexer.pm    2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Lexer.pm    2026-04-24 17:04:56.911509254 
+0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Lexer;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use constant TRACE => $ENV{YAML_PP_TRACE} ? 1 : 0;
 use constant DEBUG => ($ENV{YAML_PP_DEBUG} || $ENV{YAML_PP_TRACE}) ? 1 : 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Loader.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Loader.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Loader.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Loader.pm   2026-04-24 17:04:56.913925419 
+0200
@@ -3,7 +3,7 @@
 use warnings;
 package YAML::PP::Loader;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use YAML::PP::Parser;
 use YAML::PP::Constructor;
@@ -17,6 +17,7 @@
     my $preserve = delete $args{preserve};
     my $duplicate_keys = delete $args{duplicate_keys};
     my $require_footer = delete $args{require_footer};
+    my $max_depth = delete $args{max_depth};
     my $schemas = delete $args{schemas};
     $schemas ||= {
         '1.2' => YAML::PP->default_schema(
@@ -31,6 +32,7 @@
         preserve => $preserve,
         duplicate_keys => $duplicate_keys,
         require_footer => $require_footer,
+        max_depth => $max_depth,
     );
     my $parser = delete $args{parser};
     unless ($parser) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Parser.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Parser.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Parser.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Parser.pm   2026-04-24 17:04:56.914116087 
+0200
@@ -3,7 +3,7 @@
 use warnings;
 package YAML::PP::Parser;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use constant TRACE => $ENV{YAML_PP_TRACE} ? 1 : 0;
 use constant DEBUG => ($ENV{YAML_PP_DEBUG} || $ENV{YAML_PP_TRACE}) ? 1 : 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Perl.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Perl.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Perl.pm     2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Perl.pm     2026-04-24 17:04:56.908338800 
+0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Perl;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use base 'Exporter';
 use base 'YAML::PP';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Reader.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Reader.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Reader.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Reader.pm   2026-04-24 17:04:56.913745717 
+0200
@@ -3,7 +3,7 @@
 use warnings;
 package YAML::PP::Reader;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 sub input { return $_[0]->{input} }
 sub set_input { $_[0]->{input} = $_[1] }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Render.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Render.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Render.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Render.pm   2026-04-24 17:04:56.913835533 
+0200
@@ -3,7 +3,7 @@
 use warnings;
 package YAML::PP::Render;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use constant TRACE => $ENV{YAML_PP_TRACE} ? 1 : 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Representer.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Representer.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Representer.pm      2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Representer.pm      2026-04-24 
17:04:56.918483763 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Representer;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use Scalar::Util qw/ reftype blessed refaddr /;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Binary.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Binary.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Binary.pm    2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Binary.pm    2026-04-24 
17:04:56.919932484 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Binary;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use MIME::Base64 qw/ decode_base64 encode_base64 /;
 use YAML::PP::Common qw/ YAML_ANY_SCALAR_STYLE /;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Catchall.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Catchall.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Catchall.pm  2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Catchall.pm  2026-04-24 
17:04:56.920777915 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Catchall;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use Carp qw/ croak /;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Core.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Core.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Core.pm      2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Core.pm      2026-04-24 
17:04:56.919071339 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Core;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use YAML::PP::Schema::JSON qw/
     represent_int represent_float represent_literal represent_bool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Failsafe.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Failsafe.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Failsafe.pm  2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Failsafe.pm  2026-04-24 
17:04:56.920687331 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Failsafe;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 sub register {
     my ($self, %args) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Include.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Include.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Include.pm   2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Include.pm   2026-04-24 
17:04:56.920503229 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Include;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use Carp qw/ croak /;
 use Scalar::Util qw/ weaken /;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/JSON.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/JSON.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/JSON.pm      2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/JSON.pm      2026-04-24 
17:04:56.918871802 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::JSON;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use base 'Exporter';
 our @EXPORT_OK = qw/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Merge.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Merge.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Merge.pm     2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Merge.pm     2026-04-24 
17:04:56.919333314 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Merge;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use YAML::PP::Type::MergeKey;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Perl.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Perl.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Perl.pm      2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Perl.pm      2026-04-24 
17:04:56.918971256 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Perl;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use Scalar::Util qw/ blessed reftype /;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Tie/IxHash.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Tie/IxHash.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/Tie/IxHash.pm        2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/Tie/IxHash.pm        2026-04-24 
17:04:56.921015097 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::Tie::IxHash;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use base 'YAML::PP::Schema';
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/YAML1_1.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/YAML1_1.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema/YAML1_1.pm   2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema/YAML1_1.pm   2026-04-24 
17:04:56.920409851 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Schema::YAML1_1;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use YAML::PP::Schema::JSON qw/
     represent_int represent_float represent_literal represent_bool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Schema.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Schema.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Schema.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Schema.pm   2026-04-24 17:04:56.913651222 
+0200
@@ -4,7 +4,7 @@
 use B;
 use Module::Load qw//;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use YAML::PP::Common qw/ YAML_PLAIN_SCALAR_STYLE /;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Type/MergeKey.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Type/MergeKey.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Type/MergeKey.pm    2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Type/MergeKey.pm    2026-04-24 
17:04:56.919837290 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Type::MergeKey;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 sub new {
     my ($class) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Writer/File.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Writer/File.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Writer/File.pm      2025-02-10 
00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Writer/File.pm      2026-04-24 
17:04:56.918726462 +0200
@@ -2,7 +2,7 @@
 use warnings;
 package YAML::PP::Writer::File;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use Scalar::Util qw/ openhandle /;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP/Writer.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP/Writer.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP/Writer.pm   2025-02-10 00:05:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP/Writer.pm   2026-04-24 17:04:56.913559101 
+0200
@@ -3,7 +3,7 @@
 use warnings;
 package YAML::PP::Writer;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 sub output { return $_[0]->{output} }
 sub set_output { $_[0]->{output} = $_[1] }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/lib/YAML/PP.pm 
new/YAML-PP-v0.40.0/lib/YAML/PP.pm
--- old/YAML-PP-v0.39.0/lib/YAML/PP.pm  2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/lib/YAML/PP.pm  2026-04-24 17:04:56.901815746 +0200
@@ -3,7 +3,7 @@
 use warnings;
 package YAML::PP;
 
-our $VERSION = 'v0.39.0'; # VERSION
+our $VERSION = 'v0.40.0'; # VERSION
 
 use YAML::PP::Schema;
 use YAML::PP::Schema::JSON;
@@ -32,6 +32,7 @@
     my $footer = delete $args{footer};
     my $require_footer = delete $args{require_footer};
     my $duplicate_keys = delete $args{duplicate_keys};
+    my $max_depth = delete $args{max_depth};
     my $yaml_version = $class->_arg_yaml_version(delete $args{yaml_version});
     my $default_yaml_version = $yaml_version->[0];
     my $version_directive = delete $args{version_directive};
@@ -71,6 +72,7 @@
         preserve => $preserve,
         duplicate_keys => $duplicate_keys,
         require_footer => $require_footer,
+        max_depth => $max_depth,
     );
     my $dumper = YAML::PP::Dumper->new(
         schema => $default_schema,
@@ -523,6 +525,8 @@
         header => 1,
         footer => 0,
         version_directive => 0,
+        require_footer => 0,
+        max_depth => 512,
     );
 
 Options:
@@ -665,6 +669,8 @@
 
 Default: 0
 
+Since version v0.39
+
 This option is for dumping.
 
 Print document footer C<...>
@@ -691,6 +697,19 @@
     ---
     a: 2
 
+=item max_depth
+
+Since version v0.40
+
+default: 512
+
+Loading deeply nested, but still small YAML documents, like
+
+    [[[[[[[[[[...]]]]]]]]]]
+
+can be significantly slower than a "normal" document with the same size.
+By default the depth is limited to 512, which should be more than enough
+for 99% of the use cases.
 
 =item yaml_version
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/t/00.compile.t 
new/YAML-PP-v0.40.0/t/00.compile.t
--- old/YAML-PP-v0.39.0/t/00.compile.t  2025-02-10 00:05:00.000000000 +0100
+++ new/YAML-PP-v0.40.0/t/00.compile.t  2026-04-24 17:04:56.901411225 +0200
@@ -1,8 +1,7 @@
-use 5.006;
 use strict;
 use warnings;
 
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.059
 
 use Test::More;
 
@@ -66,7 +65,7 @@
     # see L<perlfaq8/How can I capture STDERR from an external command?>
     my $stderr = IO::Handle->new;
 
-    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . 
$str . q{'} }
+    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; 
q{'}.$str.q{'} }
             $^X, @switches, '-e', "require q[$lib]"))
         if $ENV{PERL_COMPILE_TEST_DEBUG};
 
@@ -91,15 +90,15 @@
     open my $fh, '<', $file or warn("Unable to open $file: $!"), next;
     my $line = <$fh>;
 
-    close $fh and skip("$file isn't perl", 1) unless $line =~ 
/^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
+    close $fh and skip("$file isn't perl", 1) unless $line =~ 
/^#!\s*(?:\S*(?:env )?perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
     @switches = (@switches, split(' ', $1)) if $1;
 
     close $fh and skip("$file uses -T; not testable with PERL5LIB", 1)
-        if grep { $_ eq '-T' } @switches and $ENV{PERL5LIB};
+        if grep $_ eq '-T', @switches and $ENV{PERL5LIB};
 
     my $stderr = IO::Handle->new;
 
-    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . 
$str . q{'} }
+    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; 
q{'}.$str.q{'} }
             $^X, @switches, '-c', $file))
         if $ENV{PERL_COMPILE_TEST_DEBUG};
 
@@ -113,7 +112,7 @@
         and not eval { +require blib; blib->VERSION('1.01') };
 
     # in older perls, -c output is simply the file portion of the path being 
tested
-    if (@_warnings = grep { !/\bsyntax OK$/ }
+    if (@_warnings = grep !/\bsyntax OK$/,
         grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings)
     {
         warn @_warnings;
@@ -123,7 +122,6 @@
 
 
 
-is(scalar(@warnings), 0, 'no warnings found')
-    or diag 'got warnings: ', ( Test::More->can('explain') ? 
Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if 
$ENV{AUTHOR_TESTING};
+is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( 
Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', 
@warnings) ) if $ENV{AUTHOR_TESTING};
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-PP-v0.39.0/t/58.max-depth.t 
new/YAML-PP-v0.40.0/t/58.max-depth.t
--- old/YAML-PP-v0.39.0/t/58.max-depth.t        1970-01-01 01:00:00.000000000 
+0100
+++ new/YAML-PP-v0.40.0/t/58.max-depth.t        2026-04-24 17:04:56.902363792 
+0200
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use YAML::PP;
+
+my $yp = YAML::PP->new(
+    max_depth => 5,
+);
+
+my @errors = (
+    '[[[[[[]]]]]]',
+    '[{[{[{}]}]}]',
+    '{{{{{{}}}}}}',
+    '{[{[{[]}]}]}',
+);
+for my $yaml (@errors) {
+    eval {
+        $yp->load_string($yaml);
+    };
+    like $@, qr{Depth of nesting exceeds maximum 5}, "'$yaml' expected error 
message";
+}
+
+my $yaml = '[[[[[]]]]]';
+eval {
+    $yp->load_string($yaml);
+};
+is $@, '', 'no error message';
+
+done_testing;

++++++ _scmsync.obsinfo ++++++
mtime: 1777047036
commit: 05d0dc9ed1b19a7c0767d3b345bf23296026170cdff81747a8f3c3aa385ee79c
url: https://src.opensuse.org/perl/perl-YAML-PP
revision: 05d0dc9ed1b19a7c0767d3b345bf23296026170cdff81747a8f3c3aa385ee79c
projectscmsync: https://src.opensuse.org/perl/_ObsPrj

++++++ 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-04-24 18:10:36.000000000 +0200
@@ -0,0 +1 @@
+.osc

Reply via email to