Imported Upstream version 2.23 upstream/2.23
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 25 Jul 2022 01:33:38 +0000 (10:33 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 25 Jul 2022 01:33:38 +0000 (10:33 +0900)
Changes
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
dist.ini
lib/XML/Simple.pm
t/author-pod-syntax.t [new file with mode: 0644]
t/release-pod-syntax.t [deleted file]

diff --git a/Changes b/Changes
index 32a6fa672ce5a4cc9c165118918c053c7a14d59e..80fef9692e26ec778c99d87d7f71171400cc6cca 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for XML-Simple
 
+2.23      2017-04-17 15:49:14+12:00 Pacific/Auckland
+  - another fix to the logic for detecting circular references (RT#114120 from
+    Matthias Pitzl, also report from Erland Sommarskog)
+
 2.22      2015-12-05 11:08:20+13:00 Pacific/Auckland
   - POD fix in link to package XML::SAX::ParseFactory (from Mohammad S Anwar)
   - allow subclass to override attribute escaping (from Christopher Masto)
diff --git a/LICENSE b/LICENSE
index c7ea20f99be4d486f7cf70fbc46560e354e5e553..3927bc0b14ed662fd09f06ca62e4b5120066b7f5 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -22,7 +22,7 @@ This is free software, licensed under:
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA  02110-1335  USA
+ 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
index 1f34c03dc04c3aa8fa44b94793ac766b34efef9a..036fd95c7f6613ced976da5f6f0b6064baf9857d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.022.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.043.
 Changes
 LICENSE
 MANIFEST
@@ -22,9 +22,9 @@ t/8_Namespaces.t
 t/9_Strict.t
 t/A_XMLParser.t
 t/B_Hooks.t
+t/author-pod-syntax.t
 t/desertnet.src
 t/lib/TagsToUpper.pm
-t/release-pod-syntax.t
 t/srt.xml
 t/subdir/test2.xml
 t/test1.xml
index b76fd74aa86def25f163630d938f87ff97c0d2ff..63e128988910ebc2ae5cad7e6ee6bcb3b30e99e6 100644 (file)
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Grant McLean <grantm@cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 5.022, CPAN::Meta::Converter version 2.142690",
+   "generated_by" : "Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005",
    "license" : [
       "perl_5"
    ],
@@ -46,6 +46,6 @@
          "web" : "https://github.com/grantm/xml-simple"
       }
    },
-   "version" : "2.22"
+   "version" : "2.23"
 }
 
index 46d2170d98b02a24032232ac18db718c147cf291..24e2ef3f421fdf85cc130b83dccc33a71e99be01 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -3,21 +3,21 @@ abstract: 'An API for simple XML files'
 author:
   - 'Grant McLean <grantm@cpan.org>'
 build_requires:
-  Test::More: 0.88
+  Test::More: '0.88'
 configure_requires:
-  ExtUtils::MakeMaker: 0
+  ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.022, CPAN::Meta::Converter version 2.142690'
+generated_by: 'Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: XML-Simple
 requires:
-  XML::NamespaceSupport: 1.04
-  XML::SAX: 0.15
-  XML::SAX::Expat: 0
-  perl: 5.008
+  XML::NamespaceSupport: '1.04'
+  XML::SAX: '0.15'
+  XML::SAX::Expat: '0'
+  perl: '5.008'
 resources:
   repository: git://github.com/grantm/xml-simple.git
-version: 2.22
+version: '2.23'
index b6023c728c6ed7c6703efd80812851fa262b1e42..2b61c2daff7a10fec6f6254ad44a36c20ad3fe6c 100644 (file)
@@ -1,5 +1,4 @@
-
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.022.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.043.
 use strict;
 use warnings;
 
@@ -7,8 +6,6 @@ use 5.008;
 
 use ExtUtils::MakeMaker;
 
-
-
 my %WriteMakefileArgs = (
   "ABSTRACT" => "An API for simple XML files",
   "AUTHOR" => "Grant McLean <grantm\@cpan.org>",
@@ -16,7 +13,6 @@ my %WriteMakefileArgs = (
     "ExtUtils::MakeMaker" => 0
   },
   "DISTNAME" => "XML-Simple",
-  "EXE_FILES" => [],
   "LICENSE" => "perl",
   "MIN_PERL_VERSION" => "5.008",
   "NAME" => "XML::Simple",
@@ -28,7 +24,7 @@ my %WriteMakefileArgs = (
   "TEST_REQUIRES" => {
     "Test::More" => "0.88"
   },
-  "VERSION" => "2.22",
+  "VERSION" => "2.23",
   "test" => {
     "TESTS" => "t/*.t"
   }
@@ -36,7 +32,6 @@ my %WriteMakefileArgs = (
 
 
 my %FallbackPrereqs = (
-  "ExtUtils::MakeMaker" => 0,
   "Test::More" => "0.88",
   "XML::NamespaceSupport" => "1.04",
   "XML::SAX" => "0.15",
@@ -54,6 +49,3 @@ delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
   unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
 
 WriteMakefile(%WriteMakefileArgs);
-
-
-
diff --git a/README b/README
index c96c373eb238c2ed17c8c0bea39fc5938a4f9772..bf3e8a498286088f9bb8257c3350009a6aa8f57e 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution XML-Simple,
-version 2.22:
+version 2.23:
 
   An API for simple XML files
 
@@ -11,5 +11,5 @@ This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
 
 
-This README file was generated by Dist::Zilla::Plugin::Readme v5.022.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.043.
 
index e49dd1777951ec39a7f70e397af7878175299c9a..e5e6646fa30e3ce4b788b2a8f284704991893300 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -1,6 +1,6 @@
 name             = XML-Simple
 author           = Grant McLean <grantm@cpan.org>
-version          = 2.22
+version          = 2.23
 license          = Perl_5
 copyright_holder = Grant McLean
 copyright_year   = 2015
index c1a575268399c9f3fef5b3831cd9610372befbd7..2c9c435ebb1df0e335b4c06d74ccad0f3b55a38b 100644 (file)
@@ -1,5 +1,5 @@
 package XML::Simple;
-$XML::Simple::VERSION = '2.22';
+$XML::Simple::VERSION = '2.23';
 =head1 NAME
 
 XML::Simple - An API for simple XML files
@@ -1428,10 +1428,11 @@ sub value_to_xml {
 
   # Convert to XML
 
-  if(my $refaddr = Scalar::Util::refaddr($ref)) {
+  my $refaddr = Scalar::Util::refaddr($ref);
+  if($refaddr) {
     croak "circular data structures not supported"
-      if $self->{_ancestors}->{$refaddr};
-    $self->{_ancestors}->{$refaddr} = 1;
+      if $self->{ancestors}->{$refaddr};
+    $self->{ancestors}->{$refaddr} = $ref;  # keep ref alive until we delete it
   }
   else {
     if($named) {
@@ -1649,9 +1650,7 @@ sub value_to_xml {
   }
 
 
-  if(my $refaddr = Scalar::Util::refaddr($ref)) {
-    delete $self->{_ancestors}->{$refaddr};
-  }
+  delete $self->{ancestors}->{$refaddr};
 
   return(join('', @result));
 }
diff --git a/t/author-pod-syntax.t b/t/author-pod-syntax.t
new file mode 100644 (file)
index 0000000..35fb1b9
--- /dev/null
@@ -0,0 +1,15 @@
+#!perl
+
+BEGIN {
+  unless ($ENV{AUTHOR_TESTING}) {
+    require Test::More;
+    Test::More::plan(skip_all => 'these tests are for testing by the author');
+  }
+}
+
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
+use strict; use warnings;
+use Test::More;
+use Test::Pod 1.41;
+
+all_pod_files_ok();
diff --git a/t/release-pod-syntax.t b/t/release-pod-syntax.t
deleted file mode 100644 (file)
index cdd6a6c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!perl
-
-BEGIN {
-  unless ($ENV{RELEASE_TESTING}) {
-    require Test::More;
-    Test::More::plan(skip_all => 'these tests are for release candidate testing');
-  }
-}
-
-# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
-use Test::More;
-use Test::Pod 1.41;
-
-all_pod_files_ok();