From 2f3820150e02ac9b763a813ba05ffd4041bd95e8 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 25 Jul 2022 10:33:42 +0900 Subject: [PATCH] Imported Upstream version 2.24 --- Changes | 6 ++++++ META.json | 2 +- META.yml | 2 +- Makefile.PL | 2 +- README | 2 +- dist.ini | 2 +- lib/XML/Simple.pm | 9 ++++----- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Changes b/Changes index 80fef96..585bdca 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,11 @@ Revision history for XML-Simple +2.24 2017-04-17 16:12:00+12:00 Pacific/Auckland + - fix typo in last commit with mistakenly removed some underscores + - don't initialise $XML::Simple::PREFERRED_PARSER to undef as a caller may + have already set it before loading XML::Simple and if not, it would have + defaulted to undef anyway (RT#118205 from Slaven Rezić) + 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) diff --git a/META.json b/META.json index 63e1289..d82ce98 100644 --- a/META.json +++ b/META.json @@ -46,6 +46,6 @@ "web" : "https://github.com/grantm/xml-simple" } }, - "version" : "2.23" + "version" : "2.24" } diff --git a/META.yml b/META.yml index 24e2ef3..0644a3d 100644 --- a/META.yml +++ b/META.yml @@ -20,4 +20,4 @@ requires: perl: '5.008' resources: repository: git://github.com/grantm/xml-simple.git -version: '2.23' +version: '2.24' diff --git a/Makefile.PL b/Makefile.PL index 2b61c2d..624129b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,7 +24,7 @@ my %WriteMakefileArgs = ( "TEST_REQUIRES" => { "Test::More" => "0.88" }, - "VERSION" => "2.23", + "VERSION" => "2.24", "test" => { "TESTS" => "t/*.t" } diff --git a/README b/README index bf3e8a4..bfc72e8 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ This archive contains the distribution XML-Simple, -version 2.23: +version 2.24: An API for simple XML files diff --git a/dist.ini b/dist.ini index e5e6646..67756e0 100644 --- a/dist.ini +++ b/dist.ini @@ -1,6 +1,6 @@ name = XML-Simple author = Grant McLean -version = 2.23 +version = 2.24 license = Perl_5 copyright_holder = Grant McLean copyright_year = 2015 diff --git a/lib/XML/Simple.pm b/lib/XML/Simple.pm index 2c9c435..c08df57 100644 --- a/lib/XML/Simple.pm +++ b/lib/XML/Simple.pm @@ -1,5 +1,5 @@ package XML::Simple; -$XML::Simple::VERSION = '2.23'; +$XML::Simple::VERSION = '2.24'; =head1 NAME XML::Simple - An API for simple XML files @@ -54,7 +54,6 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $PREFERRED_PARSER); @ISA = qw(Exporter); @EXPORT = qw(XMLin XMLout); @EXPORT_OK = qw(xml_in xml_out); -$PREFERRED_PARSER = undef; my %StrictMode = (); @@ -1431,8 +1430,8 @@ sub value_to_xml { my $refaddr = Scalar::Util::refaddr($ref); if($refaddr) { croak "circular data structures not supported" - if $self->{ancestors}->{$refaddr}; - $self->{ancestors}->{$refaddr} = $ref; # keep ref alive until we delete it + if $self->{_ancestors}->{$refaddr}; + $self->{_ancestors}->{$refaddr} = $ref; # keep ref alive until we delete it } else { if($named) { @@ -1650,7 +1649,7 @@ sub value_to_xml { } - delete $self->{ancestors}->{$refaddr}; + delete $self->{_ancestors}->{$refaddr}; return(join('', @result)); } -- 2.34.1