Hello community,

here is the log from the commit of package perl-YAML for openSUSE:Factory 
checked in at 2017-02-18 03:15:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-YAML (Old)
 and      /work/SRC/openSUSE:Factory/.perl-YAML.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-YAML"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-YAML/perl-YAML.changes      2017-01-15 
11:12:15.971795835 +0100
+++ /work/SRC/openSUSE:Factory/.perl-YAML.new/perl-YAML.changes 2017-02-18 
03:15:42.313112149 +0100
@@ -1,0 +2,9 @@
+Wed Feb 15 07:57:22 UTC 2017 - [email protected]
+
+- updated to 1.22
+   see /usr/share/doc/packages/perl-YAML/Changes
+
+  1.22 Tue Feb 14 23:23:08 CET 2017
+   - Add $YAML::Numify @perlpunk++
+
+-------------------------------------------------------------------

Old:
----
  YAML-1.21.tar.gz

New:
----
  YAML-1.22.tar.gz

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

Other differences:
------------------
++++++ perl-YAML.spec ++++++
--- /var/tmp/diff_new_pack.5y45Oo/_old  2017-02-18 03:15:42.837038154 +0100
+++ /var/tmp/diff_new_pack.5y45Oo/_new  2017-02-18 03:15:42.841037589 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-YAML
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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,14 +17,14 @@
 
 
 Name:           perl-YAML
-Version:        1.21
+Version:        1.22
 Release:        0
 %define cpan_name YAML
 Summary:        YAML Ain't Markup Language™
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/YAML/
-Source0:        
http://www.cpan.org/authors/id/I/IN/INGY/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/I/IN/INGY/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -61,6 +61,7 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc Changes CONTRIBUTING LICENSE README
+%doc Changes CONTRIBUTING README
+%license LICENSE
 
 %changelog

++++++ YAML-1.21.tar.gz -> YAML-1.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/CONTRIBUTING new/YAML-1.22/CONTRIBUTING
--- old/YAML-1.21/CONTRIBUTING  2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/CONTRIBUTING  2017-02-14 23:23:18.000000000 +0100
@@ -57,4 +57,4 @@
 
 
 
-# This file generated by Zilla-Dist-0.0.194
+# This file generated by Zilla-Dist-0.0.196
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/Changes new/YAML-1.22/Changes
--- old/YAML-1.21/Changes       2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/Changes       2017-02-14 23:23:18.000000000 +0100
@@ -1,3 +1,6 @@
+1.22 Tue Feb 14 23:23:08 CET 2017
+ - 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.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/LICENSE new/YAML-1.22/LICENSE
--- old/YAML-1.21/LICENSE       2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/LICENSE       2017-02-14 23:23:18.000000000 +0100
@@ -1,4 +1,4 @@
-This software is copyright (c) 2016 by Ingy döt Net.
+This software is copyright (c) 2017 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) 2016 by Ingy döt Net.
+This software is Copyright (c) 2017 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) 2016 by Ingy döt Net.
+This software is Copyright (c) 2017 by Ingy döt Net.
 
 This is free software, licensed under:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/MANIFEST new/YAML-1.22/MANIFEST
--- old/YAML-1.21/MANIFEST      2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/MANIFEST      2017-02-14 23:23:18.000000000 +0100
@@ -74,6 +74,7 @@
 t/long-quoted-value.yaml
 t/marshall.t
 t/node-info.t
+t/numify.t
 t/preserve.t
 t/pugs-objects.t
 t/references.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/META.json new/YAML-1.22/META.json
--- old/YAML-1.21/META.json     2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/META.json     2017-02-14 23:23:18.000000000 +0100
@@ -56,7 +56,7 @@
          "web" : "https://github.com/ingydotnet/yaml-pm";
       }
    },
-   "version" : "1.21",
+   "version" : "1.22",
    "x_serialization_backend" : "Cpanel::JSON::XS version 3.0115"
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/META.yml new/YAML-1.22/META.yml
--- old/YAML-1.21/META.yml      2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/META.yml      2017-02-14 23:23:18.000000000 +0100
@@ -26,5 +26,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.21'
+version: '1.22'
 x_serialization_backend: 'YAML::Tiny version 1.69'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/Makefile.PL new/YAML-1.22/Makefile.PL
--- old/YAML-1.21/Makefile.PL   2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/Makefile.PL   2017-02-14 23:23:18.000000000 +0100
@@ -21,7 +21,7 @@
     "Test::More" => "0.88",
     "Test::YAML" => "1.05"
   },
-  "VERSION" => "1.21",
+  "VERSION" => "1.22",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/README new/YAML-1.22/README
--- old/YAML-1.21/README        2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/README        2017-02-14 23:23:18.000000000 +0100
@@ -4,7 +4,7 @@
 
 VERSION
 
-    This document describes YAML version 1.21.
+    This document describes YAML version 1.22.
 
 NOTE
 
@@ -324,6 +324,13 @@
       the stringification of themselves, rather than the actual object's
       guts.
 
+    Numify
+
+      Default is 0. (false)
+
+      Values that look like numbers (integers, floats) will be numified
+      when loaded.
+
     UseHeader
 
       Default is 1. (true)
@@ -694,7 +701,7 @@
 
 COPYRIGHT AND LICENSE
 
-    Copyright 2001-2016. Ingy döt Net.
+    Copyright 2001-2017. 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.21/lib/YAML/Any.pm 
new/YAML-1.22/lib/YAML/Any.pm
--- old/YAML-1.21/lib/YAML/Any.pm       2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/lib/YAML/Any.pm       2017-02-14 23:23:18.000000000 +0100
@@ -1,6 +1,6 @@
 use strict; use warnings;
 package YAML::Any;
-our $VERSION = '1.21';
+our $VERSION = '1.22';
 
 use Exporter ();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/lib/YAML/Loader/Base.pm 
new/YAML-1.22/lib/YAML/Loader/Base.pm
--- old/YAML-1.21/lib/YAML/Loader/Base.pm       2016-12-23 21:19:24.000000000 
+0100
+++ new/YAML-1.22/lib/YAML/Loader/Base.pm       2017-02-14 23:23:18.000000000 
+0100
@@ -20,12 +20,14 @@
 has major_version => default => sub {0};
 has minor_version => default => sub {0};
 has inline        => default => sub {''};
+has numify        => default => sub {0};
 
 sub set_global_options {
     my $self = shift;
     $self->load_code($YAML::LoadCode || $YAML::UseCode)
       if defined $YAML::LoadCode or defined $YAML::UseCode;
-    $self->preserve($YAML::Preserve) if defined $YAML::Preserve
+    $self->preserve($YAML::Preserve) if defined $YAML::Preserve;
+    $self->numify($YAML::Numify) if defined $YAML::Numify;
 }
 
 sub load {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/lib/YAML/Loader.pm 
new/YAML-1.22/lib/YAML/Loader.pm
--- old/YAML-1.21/lib/YAML/Loader.pm    2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/lib/YAML/Loader.pm    2017-02-14 23:23:18.000000000 +0100
@@ -454,6 +454,11 @@
             $node = $self->_parse_inline_simple();
         }
         $node = $self->_parse_implicit($node) unless $explicit;
+
+        if ($self->numify and defined $node and not ref $node
+            and $node =~ 
m/\A-?(?:0|[1-9][0-9]*)?(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?\z/) {
+            $node += 0;
+        }
     }
     if ($explicit) {
         $node = $self->_parse_explicit($node, $explicit);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/lib/YAML.pm new/YAML-1.22/lib/YAML.pm
--- old/YAML-1.21/lib/YAML.pm   2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/lib/YAML.pm   2017-02-14 23:23:18.000000000 +0100
@@ -1,5 +1,5 @@
 package YAML;
-our $VERSION = '1.21';
+our $VERSION = '1.22';
 
 use YAML::Mo;
 
@@ -12,7 +12,8 @@
     $SpecVersion,
     $UseHeader, $UseVersion, $UseBlock, $UseFold, $UseAliases,
     $Indent, $SortKeys, $Preserve,
-    $AnchorPrefix, $CompressSeries, $InlineSeries, $Purity, $Stringify,
+    $AnchorPrefix, $CompressSeries, $InlineSeries, $Purity,
+    $Stringify, $Numify
 );
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YAML-1.21/lib/YAML.pod new/YAML-1.22/lib/YAML.pod
--- old/YAML-1.21/lib/YAML.pod  2016-12-23 21:19:24.000000000 +0100
+++ new/YAML-1.22/lib/YAML.pod  2017-02-14 23:23:18.000000000 +0100
@@ -12,7 +12,7 @@
 
 =head1 VERSION
 
-This document describes L<YAML> version B<1.21>.
+This document describes L<YAML> version B<1.22>.
 
 =head1 NOTE
 
@@ -338,6 +338,12 @@
 Objects with string overloading should honor the overloading and dump the
 stringification of themselves, rather than the actual object's guts.
 
+=item Numify
+
+Default is 0. (false)
+
+Values that look like numbers (integers, floats) will be numified when loaded.
+
 =item UseHeader
 
 Default is 1. (true)
@@ -704,7 +710,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2001-2016. Ingy döt Net.
+Copyright 2001-2017. 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.21/t/numify.t new/YAML-1.22/t/numify.t
--- old/YAML-1.21/t/numify.t    1970-01-01 01:00:00.000000000 +0100
+++ new/YAML-1.22/t/numify.t    2017-02-14 23:23:18.000000000 +0100
@@ -0,0 +1,30 @@
+use Test::More tests => 6;
+use YAML ();
+use B;
+
+my $yaml = <<'EOM';
+int: 23
+float: 3.14
+exp: 1e-5
+EOM
+
+my $data1 = do {
+    local $YAML::Numify = 1;
+    YAML::Load($yaml);
+};
+my $data2 = YAML::Load($yaml);
+
+my $int1 = B::svref_2object(\$data1->{int})->FLAGS & (B::SVp_IOK | B::SVp_NOK);
+my $int2 = B::svref_2object(\$data2->{int})->FLAGS & (B::SVp_IOK | B::SVp_NOK);
+my $float1 = B::svref_2object(\$data1->{float})->FLAGS & (B::SVp_IOK | 
B::SVp_NOK);
+my $float2 = B::svref_2object(\$data2->{float})->FLAGS & (B::SVp_IOK | 
B::SVp_NOK);
+my $exp1 = B::svref_2object(\$data1->{exp})->FLAGS & (B::SVp_IOK | B::SVp_NOK);
+my $exp2 = B::svref_2object(\$data2->{exp})->FLAGS & (B::SVp_IOK | B::SVp_NOK);
+
+ok($int1, "int with \$YAML::Numify");
+ok(! $int2, "int without \$YAML::Numify");
+ok($float1, "float with \$YAML::Numify");
+ok(! $float2, "float without \$YAML::Numify");
+ok($exp1, "exp with \$YAML::Numify");
+ok(! $exp2, "exp without \$YAML::Numify");
+done_testing;


Reply via email to