Hello community,

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

Package is "perl-YAML"

Sat May 19 15:39:19 2018 rev:40 rq:610505 version:1.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-YAML/perl-YAML.changes      2017-11-12 
17:56:43.181115748 +0100
+++ /work/SRC/openSUSE:Factory/.perl-YAML.new/perl-YAML.changes 2018-05-19 
15:39:20.629482155 +0200
@@ -1,0 +2,23 @@
+Sat May 12 06:14:02 UTC 2018 - co...@suse.com
+
+- updated to 1.25
+   see /usr/share/doc/packages/perl-YAML/Changes
+
+  1.25 Fri May 11 19:58:58 CEST 2018
+   - Applied several pull requests by tinita
+   - Support trailing comments (PR#189, PR#190, PR#191)
+   - Remove unused code (PR#192)
+   - Use Test::Deep to actually test correctly for class names (PR#193)
+   - Fix loading of mapping key which starts with `= ` (PR#194)
+   - Fix loading strings with multiple spaces (PR#172)
+   - Allow more characters in anchor name (PR#196)
+   - Add $YAML::LoadBlessed for disabling loading objects (PR#197)
+   - Applied several pull requests by tinita
+   - Disable test with long string under certain conditions (PR#201)
+   - Quote scalar if it equals '=' (PR#202)
+   - Multiple regexp roundtrip does not grow (PR#203)
+   - Add support for compact nested block sequences (PR#204)
+   - Support reverse order of block scalar indicators (PR#205)
+   - Support nested mappings in sequences (PR#206)
+
+-------------------------------------------------------------------

Old:
----
  YAML-1.24.tar.gz

New:
----
  YAML-1.25.tar.gz

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

Other differences:
------------------
++++++ perl-YAML.spec ++++++
--- /var/tmp/diff_new_pack.tijt1c/_old  2018-05-19 15:39:21.161462692 +0200
+++ /var/tmp/diff_new_pack.tijt1c/_new  2018-05-19 15:39:21.165462545 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-YAML
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,11 +17,11 @@
 
 
 Name:           perl-YAML
-Version:        1.24
+Version:        1.25
 Release:        0
 %define cpan_name YAML
 Summary:        YAML Ain't Markup Language™
-License:        Artistic-1.0 or GPL-1.0+
+License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/YAML/
 Source0:        
https://cpan.metacpan.org/authors/id/T/TI/TINITA/%{cpan_name}-%{version}.tar.gz
@@ -30,6 +30,7 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
+BuildRequires:  perl(Test::Deep)
 BuildRequires:  perl(Test::More) >= 0.88
 BuildRequires:  perl(Test::YAML) >= 1.05
 %{perl_requires}

++++++ YAML-1.24.tar.gz -> YAML-1.25.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/Changes new/YAML-1.25/Changes
--- old/YAML-1.24/Changes       2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/Changes       2018-05-11 19:59:15.000000000 +0200
@@ -1,3 +1,20 @@
+1.25 Fri May 11 19:58:58 CEST 2018
+ - Applied several pull requests by tinita
+ - Support trailing comments (PR#189, PR#190, PR#191)
+ - Remove unused code (PR#192)
+ - Use Test::Deep to actually test correctly for class names (PR#193)
+ - Fix loading of mapping key which starts with `= ` (PR#194)
+ - Fix loading strings with multiple spaces (PR#172)
+ - Allow more characters in anchor name (PR#196)
+ - Add $YAML::LoadBlessed for disabling loading objects (PR#197)
+ - Applied several pull requests by tinita
+ - Disable test with long string under certain conditions (PR#201)
+ - Quote scalar if it equals '=' (PR#202)
+ - Multiple regexp roundtrip does not grow (PR#203)
+ - Add support for compact nested block sequences (PR#204)
+ - Support reverse order of block scalar indicators (PR#205)
+ - Support nested mappings in sequences (PR#206)
+
 1.24 Mon Oct 30 20:31:53 CET 2017
  - Fix $LoadCode (PR#180, PR#181, PR#182 by @mohawk2++)
 
@@ -8,59 +25,54 @@
  - Add $YAML::Numify @perlpunk++
 
 1.21 Fri Dec 23 21:19:15 CET 2016
- - Apply PR/171 (fixes issue/109) @perlpunk++
- - No more "used only once" warnings for $YAML::Indent etc.
- - Apply PR/170 (fixes issue/131) hirat...@cpan.org++
+ - No more "used only once" warnings for $YAML::Indent etc. PR#171,
+   Issue#109 @perlpunk++
  - Empty mapping value at the end resolves to null (was becoming empty
-   string)
- - Apply PR/169 (PR/119) patrick.allen.higg...@gmail.com++
- - Output key in warning when duplicate key was found
- - Apply PR/157 and PR/168 (@lameventanas++ @perlpunk++)
- - Allow reading and writing to IO::Handle
+   string) PR#170, Issue#131 hirat...@cpan.org++
+ - Output key in warning when duplicate key was found PR#169, PR#119
+   patrick.allen.higg...@gmail.com++
+ - Allow reading and writing to IO::Handle PR#157, PR#168 @lameventanas++
+   @perlpunk++
 
 1.20 Fri Dec  2 13:20:33 PST 2016
- - Apply and amend PR/146 (quoted map keys) @preaction++
+ - Apply and amend PR#146 (quoted map keys) @preaction++
  - B::Deparse is loaded at runtime now
- - New Feature $YAML::Preserve (Apply PR/9 @fmenabe++)
+ - New Feature $YAML::Preserve (Apply PR#9 @fmenabe++)
 
 1.19 Fri Nov 18 19:46:44 CET 2016
- - Apply PR/164 pod (link to YAML::Shell)
- - Apply PR/151 Fix infinite loop for aliases without a name @bubaflub++
- - Apply PR/142 Improve error messages @werekraken++
- - Apply PR/162 Improve error messages
- - Apply PR/163 Trailing spaces after inline seq/map work now
- - Apply PR/154 Add test case for trailing comments @Varadinsky++
+ - Apply PR#164 pod (link to YAML::Shell)
+ - Apply PR#151 Fix infinite loop for aliases without a name @bubaflub++
+ - Apply PR#142 Improve error messages @werekraken++
+ - Apply PR#162 Improve error messages
+ - Apply PR#163 Trailing spaces after inline seq/map work now
+ - Apply PR#154 Add test case for trailing comments @Varadinsky++
 
 1.18 Fri Jul  8 14:52:26 UTC 2016
- - Apply PR/161 @perlpunk++
+ - List Test::More as a prereq PR#161 @perlpunk++
 
 1.17 Tue Jul  5 20:20:55 UTC 2016
  - Use Mo 0.40
 
 1.16 Sun Jul  3 10:53:06 PDT 2016
- - Apply PR/158 by @bgruening++
- - Fix VERSION issue
+ - Fix VERSION issue. PR#158 by @bgruening++
 
 1.15 Sat Apr 18 17:03:09 CEST 2015
- - Fix Issue 149.
- - Don't require newlines at end of YAML.
+ - Don't require newlines at end of YAML. Issue#149
 
 1.14 Sat Jan 17 15:32:18 PST 2015
- - Apply PR/145 from @kentnl++
- - Support for QuoteNumericStrings Global Setting
+ - Support for QuoteNumericStrings Global Setting. PR#145 @kentnl++
 
 1.13 Sat Oct 11 18:05:45 CEST 2014
- - Apply PR/140 from @nfg++
- - Disable some warnings in YAML::Any
+ - Disable some warnings in YAML::Any. PR#140 @nfg++
 
 1.12 Mon Sep 22 08:24:43 PDT 2014
  - Fix https://rt.cpan.org/Ticket/Display.html?id=97870
 
 1.11 Fri Aug 29 20:08:20 PDT 2014
- - Apply PR/139. @ehuelsmann++
+ - Remove unreachable code. PR#139. @ehuelsmann++
 
 1.10 Thu Aug 28 22:53:26 PDT 2014
- - Apply PR/138. @ehuelsmann++
+ - Improve error message about indendation. PR#138. @ehuelsmann++
 
 1.09 Tue Aug 19 16:41:13 PDT 2014
  - Replace tabs with spaces
@@ -69,7 +81,7 @@
  - Dep on Test::YAML 1.05
 
 1.07 Mon Aug 18 08:40:01 PDT 2014
- - Apply PR/8 from shlomif++. Add doc examples for YAML::Any.
+ - Add doc examples for YAML::Any. PR#8 from shlomif++
 
 1.06 Sat Aug 16 16:51:08 PDT 2014
  - Change testdir to t
@@ -343,7 +355,7 @@
  - YAC-012. Handled all Throwaway Issues. Blank lines and comments can be
    used anywhere, and they will work appropriately.
  - Converted Changes file (this file) to use YAML
- - AC-016. Support "assumed header" (---
+ - AC-016. Support "assumed header" (--- #YAML:1.0) if no header.
  - Added $YAML::UseBlock option
  - YAC-015. Support Top Level Inline nodes
  - Added testing for Store to test suite. (Now there's no excuse not to
@@ -355,7 +367,7 @@
  - Proofed documentation
  - Fix ysh doc. Document flags in the pod.
  - Move test code out of YAML.pm and into testlib
- - Change directives to use
+ - Change directives to use #
  - Parse regexes
  - YAC-017. Change !perl/ syntax
  - Emit regexes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/LICENSE new/YAML-1.25/LICENSE
--- old/YAML-1.24/LICENSE       2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/LICENSE       2018-05-11 19:59:15.000000000 +0200
@@ -1,4 +1,4 @@
-This software is copyright (c) 2017 by Ingy döt Net.
+This software is copyright (c) 2018 by Ingy döt Net.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2017 by Ingy döt Net.
+This software is Copyright (c) 2018 by Ingy döt Net.
 
 This is free software, licensed under:
 
@@ -272,7 +272,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2017 by Ingy döt Net.
+This software is Copyright (c) 2018 by Ingy döt Net.
 
 This is free software, licensed under:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/MANIFEST new/YAML-1.25/MANIFEST
--- old/YAML-1.24/MANIFEST      2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/MANIFEST      2018-05-11 19:59:15.000000000 +0200
@@ -74,17 +74,20 @@
 t/load-works.t
 t/long-quoted-value.yaml
 t/marshall.t
+t/no-load-blessed.t
 t/node-info.t
 t/numify.t
 t/preserve.t
 t/pugs-objects.t
 t/references.t
 t/regexp.t
+t/roundtrip.t
 t/rt-90593.t
 t/svk-config.yaml
 t/svk.t
 t/test.t
-t/trailing_comment_bug.t
+t/trailing-comments-content.t
+t/trailing-comments-non-content.t
 xt/meta.t
 xt/pmv.t
 xt/pod.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/META.json new/YAML-1.25/META.json
--- old/YAML-1.24/META.json     2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/META.json     2018-05-11 19:59:15.000000000 +0200
@@ -4,7 +4,7 @@
       "Ingy d\u00f6t Net <i...@cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 
2.150005",
+   "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 
2.150010",
    "license" : [
       "perl_5"
    ],
@@ -39,6 +39,8 @@
       },
       "test" : {
          "requires" : {
+            "Encode" : "0",
+            "Test::Deep" : "0",
             "Test::More" : "0.88",
             "Test::YAML" : "1.05"
          }
@@ -56,7 +58,7 @@
          "web" : "https://github.com/ingydotnet/yaml-pm";
       }
    },
-   "version" : "1.24",
-   "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233"
+   "version" : "1.25",
+   "x_serialization_backend" : "Cpanel::JSON::XS version 4.02"
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/META.yml new/YAML-1.25/META.yml
--- old/YAML-1.24/META.yml      2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/META.yml      2018-05-11 19:59:15.000000000 +0200
@@ -3,12 +3,14 @@
 author:
   - 'Ingy döt Net <i...@cpan.org>'
 build_requires:
+  Encode: '0'
+  Test::Deep: '0'
   Test::More: '0.88'
   Test::YAML: '1.05'
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 
2.150005'
+generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,5 +28,5 @@
   bugtracker: https://github.com/ingydotnet/yaml-pm/issues
   homepage: https://github.com/ingydotnet/yaml-pm
   repository: https://github.com/ingydotnet/yaml-pm.git
-version: '1.24'
+version: '1.25'
 x_serialization_backend: 'YAML::Tiny version 1.70'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/Makefile.PL new/YAML-1.25/Makefile.PL
--- old/YAML-1.24/Makefile.PL   2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/Makefile.PL   2018-05-11 19:59:15.000000000 +0200
@@ -18,10 +18,12 @@
   "NAME" => "YAML",
   "PREREQ_PM" => {},
   "TEST_REQUIRES" => {
+    "Encode" => 0,
+    "Test::Deep" => 0,
     "Test::More" => "0.88",
     "Test::YAML" => "1.05"
   },
-  "VERSION" => "1.24",
+  "VERSION" => "1.25",
   "test" => {
     "TESTS" => "t/*.t"
   }
@@ -29,6 +31,8 @@
 
 
 my %FallbackPrereqs = (
+  "Encode" => 0,
+  "Test::Deep" => 0,
   "Test::More" => "0.88",
   "Test::YAML" => "1.05"
 );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/README new/YAML-1.25/README
--- old/YAML-1.24/README        2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/README        2018-05-11 19:59:15.000000000 +0200
@@ -4,7 +4,7 @@
 
 VERSION
 
-    This document describes YAML version 1.24.
+    This document describes YAML version 1.25.
 
 NOTE
 
@@ -30,7 +30,7 @@
         # Load a YAML stream of 3 YAML documents into Perl data structures.
         my ($hashref, $arrayref, $string) = Load(<<'...');
         ---
-        name: ingy
+        name: ingy       # A Mapping
         age: old
         weight: heavy
         # I should comment that I also like pink, but don't tell anybody.
@@ -39,10 +39,10 @@
           - green
           - blue
         ---
-        - Clark Evans
+        - Clark Evans    # A Sequence
         - Oren Ben-Kiki
         - Ingy döt Net
-        --- >
+        --- >            # A Block Scalar
         You probably think YAML stands for "Yet Another Markup Language". It
         ain't! YAML is really a data serialization language. But if you want
         to think of it as a markup, that's OK with me. A lot of people try
@@ -57,6 +57,8 @@
         # YAML::Dump is used the same way you'd use Data::Dumper::Dumper
         use Data::Dumper;
         print Dumper($string, $arrayref, $hashref);
+    
+        Since version 1.25 YAML.pm supports trailing comments.
 
 DESCRIPTION
 
@@ -291,6 +293,20 @@
 
       You can override which module/class YAML uses for Dumping data.
 
+    LoadBlessed (since 1.25)
+
+      Default is 1 (true).
+
+      When set to true, YAML nodes with special tags will be automatocally
+      blessed into objects:
+
+          - !perl/hash:Foo::Bar
+              foo: 42
+
+      When loading untrusted YAML, you should disable this option by
+      setting it to 0. This will also disable setting typeglobs when
+      loading them.
+
     LoaderClass
 
       You can override which module/class YAML uses for Loading data.
@@ -690,7 +706,7 @@
 
 COPYRIGHT AND LICENSE
 
-    Copyright 2001-2017. Ingy döt Net.
+    Copyright 2001-2018. Ingy döt Net.
 
     This program is free software; you can redistribute it and/or modify it
     under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/lib/YAML/Any.pm 
new/YAML-1.25/lib/YAML/Any.pm
--- old/YAML-1.24/lib/YAML/Any.pm       2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/lib/YAML/Any.pm       2018-05-11 19:59:15.000000000 +0200
@@ -1,6 +1,6 @@
 use strict; use warnings;
 package YAML::Any;
-our $VERSION = '1.24';
+our $VERSION = '1.25';
 
 use Exporter ();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/lib/YAML/Dumper.pm 
new/YAML-1.25/lib/YAML/Dumper.pm
--- old/YAML-1.24/lib/YAML/Dumper.pm    2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/lib/YAML/Dumper.pm    2018-05-11 19:59:15.000000000 +0200
@@ -506,6 +506,7 @@
     return 0 if $_[0] =~ /\:(\s|$)/;
     return 0 if $_[0] =~ /[\s\|\>]$/;
     return 0 if $_[0] eq '-';
+    return 0 if $_[0] eq '=';
     return 1;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/lib/YAML/Loader.pm 
new/YAML-1.25/lib/YAML/Loader.pm
--- old/YAML-1.24/lib/YAML/Loader.pm    2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/lib/YAML/Loader.pm    2018-05-11 19:59:15.000000000 +0200
@@ -61,17 +61,25 @@
         $self->offset->[0] = -1;
 
         if ($self->lines->[0] =~ /^---\s*(.*)$/) {
-            my @words = split /\s+/, $1;
+            my @words = split /\s/, $1;
             %directives = ();
-            while (@words && $words[0] =~ /^#(\w+):(\S.*)$/) {
-                my ($key, $value) = ($1, $2);
-                shift(@words);
-                if (defined $directives{$key}) {
-                    $self->warn('YAML_PARSE_WARN_MULTIPLE_DIRECTIVES',
-                      $key, $self->document);
-                    next;
+            while (@words) {
+                if ($words[0] =~ /^#(\w+):(\S.*)$/) {
+                    my ($key, $value) = ($1, $2);
+                    shift(@words);
+                    if (defined $directives{$key}) {
+                        $self->warn('YAML_PARSE_WARN_MULTIPLE_DIRECTIVES',
+                          $key, $self->document);
+                        next;
+                    }
+                    $directives{$key} = $value;
+                }
+                elsif ($words[0] eq '') {
+                    shift @words;
+                }
+                else {
+                    last;
                 }
-                $directives{$key} = $value;
             }
             $self->preface(join ' ', @words);
         }
@@ -111,7 +119,7 @@
     my $preface = $self->preface;
     $self->preface('');
     my ($node, $type, $indicator, $chomp, $parsed_inline) = ('') x 5;
-    my ($anchor, $alias, $explicit, $implicit, $class) = ('') x 5;
+    my ($anchor, $alias, $explicit, $implicit) = ('') x 4;
     ($anchor, $alias, $explicit, $implicit, $preface) =
       $self->_parse_qualifiers($preface);
     if ($anchor) {
@@ -120,12 +128,21 @@
     $self->inline('');
     while (length $preface) {
         my $line = $self->line - 1;
-        if ($preface =~ s/^($FOLD_CHAR|$LIT_CHAR_RX)(-|\+)?\d*\s*//) {
+        if ($preface =~ s/^($FOLD_CHAR|$LIT_CHAR_RX)//) {
             $indicator = $1;
-            $chomp = $2 if defined($2);
+            if ($preface =~ s/^([+-])[0-9]*//) {
+                $chomp = $1;
+            }
+            elsif ($preface =~ s/^[0-9]+([+-]?)//) {
+                $chomp = $1;
+            }
+            if ($preface =~ s/^(?:\s+#.*$|\s*)$//) {
+            }
+            else {
+                $self->die('YAML_PARSE_ERR_TEXT_AFTER_INDICATOR');
+            }
         }
         else {
-            $self->die('YAML_PARSE_ERR_TEXT_AFTER_INDICATOR') if $indicator;
             $self->inline($preface);
             $preface = '';
         }
@@ -185,17 +202,7 @@
     $#{$self->offset} = $self->level;
 
     if ($explicit) {
-        if ($class) {
-            if (not ref $node) {
-                my $copy = $node;
-                undef $node;
-                $node = \$copy;
-            }
-            CORE::bless $node, $class;
-        }
-        else {
-            $node = $self->_parse_explicit($node, $explicit) if 
!$parsed_inline;
-        }
+        $node = $self->_parse_explicit($node, $explicit) if !$parsed_inline;
     }
     if ($anchor) {
         if (ref($self->anchor2node->{$anchor}) eq 'YAML-anchor2node') {
@@ -230,7 +237,7 @@
         elsif ($preface =~ s/^\&([^ ,:]*)\s*//) {
             $token = $1;
             $self->die('YAML_PARSE_ERR_BAD_ANCHOR')
-              unless $token =~ /^[a-zA-Z0-9]+$/;
+              unless $token =~ /^[a-zA-Z0-9_.\/-]+$/;
             $self->die('YAML_PARSE_ERR_MANY_ANCHOR') if $anchor;
             $self->die('YAML_PARSE_ERR_ANCHOR_ALIAS') if $alias;
             $anchor = $token;
@@ -270,7 +277,7 @@
             $node = \$value;
         }
 
-        if ( length($class) ) {
+        if ( length($class) and $YAML::LoadBlessed ) {
             CORE::bless($node, $class);
         }
 
@@ -296,7 +303,7 @@
             require YAML::Node;
             return $class->yaml_load(YAML::Node->new($node, $explicit));
         }
-        else {
+        elsif ($YAML::LoadBlessed) {
             if (ref $node) {
                 return CORE::bless $node, $class;
             }
@@ -304,6 +311,9 @@
                 return CORE::bless \$node, $class;
             }
         }
+        else {
+            return $node;
+        }
     }
     elsif (ref $node) {
         require YAML::Node;
@@ -332,11 +342,11 @@
             $key = "$key";
         }
         # If "default" key (equals sign)
-        elsif ($self->{content} =~ s/^\=\s*//) {
+        elsif ($self->{content} =~ s/^\=\s*(?=:)//) {
             $key = VALUE;
         }
         # If "comment" key (slash slash)
-        elsif ($self->{content} =~ s/^\=\s*//) {
+        elsif ($self->{content} =~ s/^\=\s*(?=:)//) {
             $key = COMMENT;
         }
         # Regular scalar key:
@@ -348,7 +358,7 @@
             $self->inline('');
         }
 
-        unless ($self->{content} =~ s/^:\s*//) {
+        unless ($self->{content} =~ s/^:(?:\s+#.*$|\s*)//) {
             $self->die('YAML_LOAD_ERR_BAD_MAP_ELEMENT');
         }
         $self->preface($self->content);
@@ -384,9 +394,21 @@
         # that a key is a quoted string, which itself may contain escaped
         # quotes.
         my $preface = $self->preface;
-        if ( $preface =~ /^ (\s*) ( \w .*?               \: (?:\ |$).*) $/x  or
+        if ($preface =~ m/^ (\s*) ( - (?: \ .* | $ ) ) /x) {
+            $self->indent($self->offset->[$self->level] + 2 + length($1));
+            $self->content($2);
+            $self->level($self->level + 1);
+            $self->offset->[$self->level] = $self->indent;
+            $self->preface('');
+            push @$seq, $self->_parse_seq('');
+            $self->{level}--;
+            $#{$self->offset} = $self->level;
+        }
+        elsif (
              $preface =~ /^ (\s*) ((') (?:''|[^'])*? ' \s* \: (?:\ |$).*) $/x 
or
-             $preface =~ /^ (\s*) ((") (?:\\\\|[^"])*? " \s* \: (?:\ |$).*) $/x
+             $preface =~ /^ (\s*) ((") (?:\\\\|[^"])*? " \s* \: (?:\ |$).*) 
$/x or
+             $preface =~ /^ (\s*) (\?.*$)/x or
+             $preface =~ /^ (\s*) ([^\s:#&!\[\]\{\},*|>].*\:(\ .*|$))/x
            ) {
             $self->indent($self->offset->[$self->level] + 2 + length($1));
             $self->content($2);
@@ -486,7 +508,7 @@
 
     $self->die('YAML_PARSE_ERR_INLINE_MAP')
       unless $self->{inline} =~ s/^\{\s*//;
-    while (not $self->{inline} =~ s/^\s*\}\s*//) {
+    while (not $self->{inline} =~ s/^\s*\}(\s+#.*$|\s*)//) {
         my $key = $self->_parse_inline();
         $self->die('YAML_PARSE_ERR_INLINE_MAP')
           unless $self->{inline} =~ s/^\: \s*//;
@@ -513,7 +535,7 @@
 
     $self->die('YAML_PARSE_ERR_INLINE_SEQUENCE')
       unless $self->{inline} =~ s/^\[\s*//;
-    while (not $self->{inline} =~ s/^\s*\]\s*//) {
+    while (not $self->{inline} =~ s/^\s*\](\s+#.*$|\s*)//) {
         my $value = $self->_parse_inline();
         push @$node, $value;
         next if $self->inline =~ /^\s*\]/;
@@ -526,33 +548,43 @@
 # Parse the inline double quoted string.
 sub _parse_inline_double_quoted {
     my $self = shift;
-    my $node;
-    # https://rt.cpan.org/Public/Bug/Display.html?id=90593
-    if ($self->inline =~ /^"((?:(?:\\"|[^"]){0,32766}){0,32766})"\s*(.*)$/) {
-        $node = $1;
-        $self->inline($2);
-        $node =~ s/\\"/"/g;
-    }
-    else {
-        $self->die('YAML_PARSE_ERR_BAD_DOUBLE');
+    my $inline = $self->inline;
+    if ($inline =~ s/^"//) {
+        my $node = '';
+
+        while ($inline =~ s/^(\\.|[^"\\]+)//) {
+            my $capture = $1;
+            $capture =~ s/^\\"/"/;
+            $node .= $capture;
+            last unless length $inline;
+        }
+        if ($inline =~ s/^"(?:\s+#.*|\s*)//) {
+            $self->inline($inline);
+            return $node;
+        }
     }
-    return $node;
+    $self->die('YAML_PARSE_ERR_BAD_DOUBLE');
 }
 
 
 # Parse the inline single quoted string.
 sub _parse_inline_single_quoted {
     my $self = shift;
-    my $node;
-    if ($self->inline =~ /^'((?:(?:''|[^']){0,32766}){0,32766})'\s*(.*)$/) {
-        $node = $1;
-        $self->inline($2);
-        $node =~ s/''/'/g;
-    }
-    else {
-        $self->die('YAML_PARSE_ERR_BAD_SINGLE');
+    my $inline = $self->inline;
+    if ($inline =~ s/^'//) {
+        my $node = '';
+        while ($inline =~ s/^(''|[^']+)//) {
+            my $capture = $1;
+            $capture =~ s/^''/'/;
+            $node .= $capture;
+            last unless length $inline;
+        }
+        if ($inline =~ s/^'(?:\s+#.*|\s*)//) {
+            $self->inline($inline);
+            return $node;
+        }
     }
-    return $node;
+    $self->die('YAML_PARSE_ERR_BAD_SINGLE');
 }
 
 # Parse the inline unquoted string and do implicit typing.
@@ -572,6 +604,9 @@
 sub _parse_implicit {
     my $self = shift;
     my ($value) = @_;
+    # remove trailing comments and whitespace
+    $value =~ s/^#.*$//;
+    $value =~ s/\s+#.*$//;
     $value =~ s/\s*$//;
     return $value if $value eq '';
     return undef if $value =~ /^~$/;
@@ -651,14 +686,16 @@
     $self->{line}++;
 
     # Determine the offset for a new leaf node
+    # TODO
     if ($self->preface =~
-        qr/(?:^|\s)(?:$FOLD_CHAR|$LIT_CHAR_RX)(?:-|\+)?(\d*)\s*$/
+        
qr/(?:^|\s)(?:$FOLD_CHAR|$LIT_CHAR_RX)(?:[+-]([0-9]*)|([0-9]*)[+-]?)(?:\s+#.*|\s*)$/
        ) {
+        my $explicit_indent = length $1 ? $1 : length $2 ? $2 : '';
         $self->die('YAML_PARSE_ERR_ZERO_INDENT')
-          if length($1) and $1 == 0;
+          if length($explicit_indent) and $explicit_indent == 0;
         $type = LEAF;
-        if (length($1)) {
-            $self->offset->[$level + 1] = $offset + $1;
+        if (length($explicit_indent)) {
+            $self->offset->[$level + 1] = $offset + $explicit_indent;
         }
         else {
             # First get rid of any comments.
@@ -701,12 +738,22 @@
     }
 
     if ($type == LEAF) {
-        while (@{$self->lines} and
+        if (@{$self->lines} and
                $self->lines->[0] =~ m{^( *)(\#)} and
                length($1) < $offset
               ) {
-            shift @{$self->lines};
-            $self->{line}++;
+            if ( length($1) < $offset) {
+                shift @{$self->lines};
+                $self->{line}++;
+                # every comment after that is also thrown away regardless
+                # of identation
+                while (@{$self->lines} and
+                       $self->lines->[0] =~ m{^( *)(\#)}
+                      ) {
+                    shift @{$self->lines};
+                    $self->{line}++;
+                }
+            }
         }
         $self->eos($self->{done} = not @{$self->lines});
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/lib/YAML/Types.pm 
new/YAML-1.25/lib/YAML/Types.pm
--- old/YAML-1.24/lib/YAML/Types.pm     2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/lib/YAML/Types.pm     2018-05-11 19:59:15.000000000 +0200
@@ -99,7 +99,9 @@
     }
     no strict 'refs';
     if (exists $node->{SCALAR}) {
-        *{"${package}::$name"} = \$node->{SCALAR};
+        if ($YAML::LoadBlessed) {
+            *{"${package}::$name"} = \$node->{SCALAR};
+        }
         delete $node->{SCALAR};
     }
     for my $elem (qw(ARRAY HASH CODE IO)) {
@@ -109,7 +111,9 @@
                 delete $node->{IO};
                 next;
             }
-            *{"${package}::$name"} = $node->{$elem};
+            if ($YAML::LoadBlessed) {
+                *{"${package}::$name"} = $node->{$elem};
+            }
             delete $node->{$elem};
         }
     }
@@ -166,12 +170,12 @@
             return sub {};
         }
         else {
-            CORE::bless $code, $class if $class;
+            CORE::bless $code, $class if ($class and $YAML::LoadBlessed);
             return $code;
         }
     }
     else {
-        return CORE::bless sub {}, $class if $class;
+        return CORE::bless sub {}, $class if ($class and $YAML::LoadBlessed);
         return sub {};
     }
 }
@@ -222,13 +226,14 @@
 sub yaml_load {
     my $self = shift;
     my ($node, $class) = @_;
-    return qr{$node} unless $node =~ /^\(\?([\^\-xism]*):(.*)\)\z/s;
+    return qr{$node} unless $node =~ /^\(\?([\^\-uxism]*):(.*)\)\z/s;
     my ($flags, $re) = ($1, $2);
     $flags =~ s/-.*//;
     $flags =~ s/^\^//;
+    $flags =~ tr/u//d;
     my $sub = _QR_TYPES->{$flags} || sub { qr{$_[0]} };
     my $qr = &$sub($re);
-    bless $qr, $class if length $class;
+    bless $qr, $class if (length $class and $YAML::LoadBlessed);
     return $qr;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/lib/YAML.pm new/YAML-1.25/lib/YAML.pm
--- old/YAML-1.24/lib/YAML.pm   2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/lib/YAML.pm   2018-05-11 19:59:15.000000000 +0200
@@ -1,5 +1,5 @@
 package YAML;
-our $VERSION = '1.24';
+our $VERSION = '1.25';
 
 use YAML::Mo;
 
@@ -13,9 +13,11 @@
     $UseHeader, $UseVersion, $UseBlock, $UseFold, $UseAliases,
     $Indent, $SortKeys, $Preserve,
     $AnchorPrefix, $CompressSeries, $InlineSeries, $Purity,
-    $Stringify, $Numify
+    $Stringify, $Numify, $LoadBlessed,
 );
 
+$LoadBlessed = 1;
+
 
 use YAML::Node; # XXX This is a temp fix for Module::Build
 use Scalar::Util qw/ openhandle /;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/lib/YAML.pod new/YAML-1.25/lib/YAML.pod
--- old/YAML-1.24/lib/YAML.pod  2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/lib/YAML.pod  2018-05-11 19:59:15.000000000 +0200
@@ -12,7 +12,7 @@
 
 =head1 VERSION
 
-This document describes L<YAML> version B<1.24>.
+This document describes L<YAML> version B<1.25>.
 
 =head1 NOTE
 
@@ -38,7 +38,7 @@
     # Load a YAML stream of 3 YAML documents into Perl data structures.
     my ($hashref, $arrayref, $string) = Load(<<'...');
     ---
-    name: ingy
+    name: ingy       # A Mapping
     age: old
     weight: heavy
     # I should comment that I also like pink, but don't tell anybody.
@@ -47,10 +47,10 @@
       - green
       - blue
     ---
-    - Clark Evans
+    - Clark Evans    # A Sequence
     - Oren Ben-Kiki
     - Ingy döt Net
-    --- >
+    --- >            # A Block Scalar
     You probably think YAML stands for "Yet Another Markup Language". It
     ain't! YAML is really a data serialization language. But if you want
     to think of it as a markup, that's OK with me. A lot of people try
@@ -66,6 +66,8 @@
     use Data::Dumper;
     print Dumper($string, $arrayref, $hashref);
 
+    Since version 1.25 YAML.pm supports trailing comments.
+
 =head1 DESCRIPTION
 
 The YAML.pm module implements a YAML Loader and Dumper based on the YAML 1.0
@@ -308,6 +310,19 @@
 
 You can override which module/class YAML uses for Dumping data.
 
+=item LoadBlessed (since 1.25)
+
+Default is 1 (true).
+
+When set to true, YAML nodes with special tags will be automatocally blessed
+into objects:
+
+    - !perl/hash:Foo::Bar
+        foo: 42
+
+When loading untrusted YAML, you should disable this option by setting it to
+C<0>. This will also disable setting typeglobs when loading them.
+
 =item LoaderClass
 
 You can override which module/class YAML uses for Loading data.
@@ -701,7 +716,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2001-2017. Ingy döt Net.
+Copyright 2001-2018. Ingy döt Net.
 
 This program is free software; you can redistribute it and/or modify it under
 the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/2-scalars.t new/YAML-1.25/t/2-scalars.t
--- old/YAML-1.24/t/2-scalars.t 2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/t/2-scalars.t 2018-05-11 19:59:15.000000000 +0200
@@ -2,6 +2,7 @@
 use strict;
 use Test::More;
 
+use Config;
 require YAML;
 YAML->import;
 
@@ -29,9 +30,35 @@
 is_deeply(Load(Dump($Data)), $Data);
 
 if ($^V ge v5.9.0) {
-# Large data tests. See also 
https://bugzilla.redhat.com/show_bug.cgi?id=192400.
-    $Data = ' äø<> " \' " \'' x 40_000;
-    is(Load(Dump($Data)), $Data);
+    # see https://github.com/ingydotnet/yaml-pm/issues/186
+    unless ($Config{config_args} =~ / \-fsanitize \= (?: address | undefined ) 
\b /x) {
+        # Large data tests. See also 
https://bugzilla.redhat.com/show_bug.cgi?id=192400.
+        $Data = ' äø<> " \' " \'' x 40_000;
+        is(Load(Dump($Data)), $Data);
+    }
+}
+
+{
+    my $yaml1 = <<'EOM';
+a: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+b: 2
+EOM
+    my $yaml2 = <<'EOM';
+a: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+b: 2
+EOM
+    my $error;
+    eval {
+        my @data = Load($yaml1);
+    };
+    $error = $@;
+    cmp_ok($error, '=~', "Can't parse single", "Single quoted without end");
+
+    eval {
+        my @data = Load($yaml2);
+    };
+    $error = $@;
+    cmp_ok($error, '=~', "Can't parse double", "Double quoted without end");
 }
 
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/load-tests.t new/YAML-1.25/t/load-tests.t
--- old/YAML-1.24/t/load-tests.t        2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/t/load-tests.t        2018-05-11 19:59:15.000000000 +0200
@@ -1,6 +1,7 @@
 use strict;
 use lib -e 't' ? 't' : 'test';
-use TestYAML tests => 30;
+use TestYAML tests => 37;
+use Test::Deep;
 
 run {
     my $block = shift;
@@ -18,7 +19,7 @@
               . $errors);
         next;
     }
-    is_deeply(
+    cmp_deeply(
         \@result,
         \@expect,
         $block->description,
@@ -211,14 +212,14 @@
 - >
  # Not a comment;
 # Is a comment
- #Not a comment
+ #Another comment
 --- 42
           #Final
          #Comment
 +++ perl
 ([2,3,4,5],
  {foo => 'bar', boo => 'far'},
- ["# Not a comment; #Not a comment\n"],
+ ["# Not a comment;\n"],
  42)
 === several docs, some empty
 +++ yaml
@@ -410,3 +411,76 @@
   "test \\": 23
 +++ perl
 [{ 'test - ' => 23, "test ' " => 23, 'test \\' => 23 }]
+=== Plain string with multiple spaces
++++ yaml
+--- A       B
++++ perl
+'A       B'
+=== Plain string with multiple spaces at the beginning
++++ yaml
+--- "   ABC"
++++ perl
+'   ABC'
+=== Allowed characters in anchors
++++ yaml
+---
+- &a.1 a
+- &b/2 b
+- &c_3 c
+- &d-4 d
++++ perl
+['a', 'b', 'c', 'd']
+
+=== Compact nested block sequences
++++ yaml
+- - a
+  -  b
+  - - 1
+  -  - 2
+     - 3
+- - [c]
++++ perl
+[
+    ['a', 'b', [1], [2,3] ],
+    [ ['c'] ],
+]
+
+=== Combined block scalar indicators
++++ yaml
+---
+a: |-2
+    1
+  2
+b: |2-
+    1
+  2
+c: >+2
+    1
+  2
+d: >2+
+    1
+  2
++++ perl
+{
+    a => "  1\n2",
+    b => "  1\n2",
+    c => "  1\n2\n",
+    d => "  1\n2\n",
+}
+
+=== Nested explicit key
++++ yaml
+---
+- ? a
+  : b
++++ perl
+[{ a => 'b' }]
+
+=== Nested mappings with non \w keys
++++ yaml
+---
+- .: a
+  <: b
+  -: c
++++ perl
+[ { '.' => 'a', '<' => 'b', '-' => 'c' } ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/no-load-blessed.t 
new/YAML-1.25/t/no-load-blessed.t
--- old/YAML-1.24/t/no-load-blessed.t   1970-01-01 01:00:00.000000000 +0100
+++ new/YAML-1.25/t/no-load-blessed.t   2018-05-11 19:59:15.000000000 +0200
@@ -0,0 +1,110 @@
+use strict;
+use lib -e 't' ? 't' : 'test';
+use TestYAML tests => 10;
+use Test::Deep;
+use YAML ();
+$YAML::LoadBlessed = 0;
+
+run {
+    my $block = shift;
+    my @result = eval {
+        Load($block->yaml)
+    };
+    my $error1 = $@ || '';
+    if ( $error1 ) {
+        # $error1 =~ s{line: (\d+)}{"line: $1   
($0:".($1+$test->{lines}{yaml}-1).")"}e;
+    }
+    my @expect = eval $block->perl;
+    my $error2 = $@ || '';
+    if (my $errors = $error1 . $error2) {
+        fail($block->description
+              . $errors);
+        next;
+    }
+    cmp_deeply(
+        \@result,
+        \@expect,
+        $block->description,
+    ) or do {
+        require Data::Dumper;
+        diag("Wanted: ".Data::Dumper::Dumper(\@expect));
+        diag("Got: ".Data::Dumper::Dumper(\@result));
+    }
+};
+
+{
+    local $YAML::LoadCode = 1;
+    my $data = YAML::Load(<<'EOM');
+--- !!perl/code:Foo::Bar |
+{
+    return $_[0] * 2
+}
+EOM
+    my $ref = ref $data;
+    cmp_ok($ref, 'eq', 'CODE', "Coderef loaded, but not blessed");
+    my $result = $data->(2);
+    cmp_ok($result, 'eq', 4, "Coderef works");
+}
+
+{
+    $main::foo = 23;
+    my $data = YAML::Load(<<'EOM');
+--- !!perl/glob:moose
+  PACKAGE: main
+  NAME: foo
+  SCALAR: 42
+EOM
+    my $ref = ref $data;
+    cmp_ok($main::foo, '==', 23, "Glob did not set variable");
+}
+
+__DATA__
+=== an array of assorted junk
++++ yaml
+---
+# a private Perl XYZ object
+- !perl/XYZ {small: object}
+# an object containing objects
+- !perl/ABC [!perl/@DEF [a,b,c],!perl/GHI {do: re, mi: fa, so: la,ti: do}]
++++ perl
+my $i = {small => 'object'};
+my $j = [[qw(a b c)],
+            {do => 're', mi => 'fa', so => 'la', ti => 'do'},
+          ];
+[ $i, $j ]
+=== !!perl/array:moose
++++ yaml
+--- !!perl/array:moose
+- 1
++++ perl
+[ 1 ]
+=== !!perl/hash:moose
++++ yaml
+--- !!perl/hash:moose
+foo: bar
++++ perl
+{ foo => "bar" }
+=== !!perl/ref:moose
++++ yaml
+--- !!perl/ref:moose
+=: 1
++++ perl
+do { my $x = 1; \$x}
+=== !!perl/scalar:moose
++++ yaml
+--- !!perl/scalar:moose 1
++++ perl
+do { my $x = 1; \$x}
+=== !!perl/regexp:moose
++++ yaml
+--- !!perl/regexp:moose (?-xism:foo$)
++++ perl
+qr{foo$}
+=== !!perl/glob:moose
++++ yaml
+--- !!perl/glob:moose
+  PACKAGE: main
+  NAME: foo
+  SCALAR: 0
++++ perl
+*main::foo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/regexp.t new/YAML-1.25/t/regexp.t
--- old/YAML-1.24/t/regexp.t    2017-10-30 20:32:06.000000000 +0100
+++ new/YAML-1.25/t/regexp.t    2018-05-11 19:59:15.000000000 +0200
@@ -1,7 +1,8 @@
 use strict;
 use lib -e 't' ? 't' : 'test';
-use TestYAML tests => 11;
+use TestYAML tests => 12;
 use YAML();
+use Encode;
 no warnings 'once';
 
 my $m_xis = "m-xis";
@@ -69,6 +70,17 @@
 
 like "Barfoo", $re, 'The regexp works';
 
+my $yaml = decode_utf8 q{re : !!perl/regexp OK};
+$re = Load $yaml;
+$yaml = Dump $re;
+my $compare = $yaml;
+for (1 .. 5) {
+    $re = Load $yaml;
+    $yaml = Dump $re;
+}
+
+cmp_ok($yaml, 'eq', $compare, "Regexp multiple roundtrip does not grow");
+
 
 __END__
 === A regexp with flag
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/roundtrip.t new/YAML-1.25/t/roundtrip.t
--- old/YAML-1.24/t/roundtrip.t 1970-01-01 01:00:00.000000000 +0100
+++ new/YAML-1.25/t/roundtrip.t 2018-05-11 19:59:15.000000000 +0200
@@ -0,0 +1,14 @@
+use strict;
+use warnings;
+
+use YAML;
+use Test::More tests => 1;
+use Test::Deep;
+
+my %in = ( '=' => 'value' );
+my $yaml = Dump \%in;
+my $roundtrip = Load $yaml;
+cmp_deeply($roundtrip, \%in, "Roundtrip with '=' hash key");
+
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/trailing-comments-content.t 
new/YAML-1.25/t/trailing-comments-content.t
--- old/YAML-1.24/t/trailing-comments-content.t 1970-01-01 01:00:00.000000000 
+0100
+++ new/YAML-1.25/t/trailing-comments-content.t 2018-05-11 19:59:15.000000000 
+0200
@@ -0,0 +1,76 @@
+use strict;
+use lib -e 't' ? 't' : 'test';
+use TestYAML tests => 6;
+
+run {
+    my $block = shift;
+    my @result = eval {
+        Load($block->yaml)
+    };
+    my $error1 = $@ || '';
+    if ( $error1 ) {
+        # $error1 =~ s{line: (\d+)}{"line: $1   
($0:".($1+$test->{lines}{yaml}-1).")"}e;
+    }
+    my @expect = eval $block->perl;
+    my $error2 = $@ || '';
+    if (my $errors = $error1 . $error2) {
+        fail($block->description
+              . $errors);
+        next;
+    }
+    is_deeply(
+        \@result,
+        \@expect,
+        $block->description,
+    ) or do {
+        require Data::Dumper;
+        diag("Wanted: ".Data::Dumper::Dumper(\@expect));
+        diag("Got: ".Data::Dumper::Dumper(\@result));
+    }
+};
+
+__DATA__
+
+=== Comment after simple mapping value
++++ yaml
+---
+foo: val #comment val
++++ perl
+{ foo => "val" }
+
+=== Comment after simple sequence value
++++ yaml
+---
+foo:
+ - s2 #comment s2
++++ perl
+{ foo => ['s2'] }
+
+=== Comment after simple sequence value (2)
++++ yaml
+---
+- s2 #comment s1
++++ perl
+['s2']
+
+=== Comment after simple top level scalar
++++ yaml
+--- abc # comment abc
++++ perl
+'abc'
+
+=== Comment after empty mapping value
++++ yaml
+---
+foo:  #comment foo
+bar: #comment bar
++++ perl
+{ foo => undef, bar => undef }
+
+=== Comment after empty sequence value
++++ yaml
+---
+foo:
+ - # empty sequence value
++++ perl
+{ foo => [''] }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/trailing-comments-non-content.t 
new/YAML-1.25/t/trailing-comments-non-content.t
--- old/YAML-1.24/t/trailing-comments-non-content.t     1970-01-01 
01:00:00.000000000 +0100
+++ new/YAML-1.25/t/trailing-comments-non-content.t     2018-05-11 
19:59:15.000000000 +0200
@@ -0,0 +1,81 @@
+use strict;
+use lib -e 't' ? 't' : 'test';
+use TestYAML tests => 7;
+
+# testing trailing comments which were errors before
+
+run {
+    my $block = shift;
+    my @result = eval {
+        Load($block->yaml)
+    };
+    my $error1 = $@ || '';
+    if ( $error1 ) {
+        # $error1 =~ s{line: (\d+)}{"line: $1   
($0:".($1+$test->{lines}{yaml}-1).")"}e;
+    }
+    my @expect = eval $block->perl;
+    my $error2 = $@ || '';
+    if (my $errors = $error1 . $error2) {
+        fail($block->description
+              . $errors);
+        next;
+    }
+    is_deeply(
+        \@result,
+        \@expect,
+        $block->description,
+    ) or do {
+        require Data::Dumper;
+        diag("Wanted: ".Data::Dumper::Dumper(\@expect));
+        diag("Got: ".Data::Dumper::Dumper(\@result));
+    }
+};
+
+__DATA__
+
+=== Comment after inline seq
++++ yaml
+---
+seq: [314] #comment
++++ perl
+{ seq => [314] }
+
+=== Comment after inline map
++++ yaml
+---
+map: {x: y} #comment
++++ perl
+{ map => { x => 'y' }, }
+
+=== Comment after literal block scalar indicator
++++ yaml
+---
+- |- #comment
++++ perl
+['']
+
+=== Comment after folded block scalar indicator
++++ yaml
+---
+- >- #comment
++++ perl
+['']
+
+=== Comment after top level literal block scalar indicator
++++ yaml
+--- |- #comment
++++ perl
+''
+=== Comment after double quoted string
++++ yaml
+---
+quoted: "string" #comment
++++ perl
+{ quoted => 'string' }
+
+=== Comment after single quoted string
++++ yaml
+---
+quoted: 'string'  #comment
++++ perl
+{ quoted => 'string' }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.24/t/trailing_comment_bug.t 
new/YAML-1.25/t/trailing_comment_bug.t
--- old/YAML-1.24/t/trailing_comment_bug.t      2017-10-30 20:32:06.000000000 
+0100
+++ new/YAML-1.25/t/trailing_comment_bug.t      1970-01-01 01:00:00.000000000 
+0100
@@ -1,19 +0,0 @@
-use strict;
-use warnings;
-
-# todo test for github issue:
-# Trailing comments aren't ignored #143
-
-# https://github.com/ingydotnet/yaml-pm/issues/143
-
-use Test::More tests => 1;
-
-use YAML;
-
-TODO: {
-
-       local $TODO = 'This bug only happens when using YAML (YAML::Old) dist.';
-
-       is( Load ("--- 123 # comment\n"), '123', 'Ignore trailing comment');
-
-}


Reply via email to