Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-XML-XPath for openSUSE:Factory checked in at 2022-05-22 20:26:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-XML-XPath (Old) and /work/SRC/openSUSE:Factory/.perl-XML-XPath.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-XML-XPath" Sun May 22 20:26:19 2022 rev:37 rq:978230 version:1.47 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-XML-XPath/perl-XML-XPath.changes 2018-11-13 16:28:43.426373836 +0100 +++ /work/SRC/openSUSE:Factory/.perl-XML-XPath.new.1538/perl-XML-XPath.changes 2022-05-22 20:26:31.186183944 +0200 @@ -1,0 +2,21 @@ +Sat May 14 03:08:51 UTC 2022 - Tina M??ller <[email protected]> + +- updated to 1.47 + see /usr/share/doc/packages/perl-XML-XPath/Changes + + 1.47 2022-05-13 MANWAR + - Another bunch of patches, thanks @shawnm. + a) Get the encoding used for command line arguments from + the environment. + b) Don't assume standard input and output are UTF-8; also + get their encoding from the environment. + + 1.46 2022-05-12 MANWAR + - Added missing unit test (t/52matches.t) + - Added missing unit test (t/cleanup.t) + - Added unit test for MANIFEST (t/manifest.t) + + 1.45 2022-05-12 MANWAR + - Added XPath function matches(), thanks @shawnw. + +------------------------------------------------------------------- Old: ---- XML-XPath-1.44.tar.gz New: ---- XML-XPath-1.47.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-XML-XPath.spec ++++++ --- /var/tmp/diff_new_pack.b4SWGh/_old 2022-05-22 20:26:31.670184657 +0200 +++ /var/tmp/diff_new_pack.b4SWGh/_new 2022-05-22 20:26:31.674184662 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-XML-XPath # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,16 @@ # +%define cpan_name XML-XPath Name: perl-XML-XPath -Version: 1.44 +Version: 1.47 Release: 0 -%define cpan_name XML-XPath -Summary: Parse and evaluate XPath statements License: Artistic-2.0 -Group: Development/Libraries/Perl -Url: https://metacpan.org/release/%{cpan_name} +Summary: Parse and evaluate XPath statements +URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/M/MA/MANWAR/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Path::Tiny) >= 0.076 @@ -44,15 +42,15 @@ support functionality beyond XPath. %prep -%setup -q -n %{cpan_name}-%{version} -find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 +%autosetup -n %{cpan_name}-%{version} +find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor -%{__make} %{?_smp_mflags} +%make_build %check -%{__make} test +make test %install %perl_make_install @@ -60,7 +58,6 @@ %perl_gen_filelist %files -f %{name}.files -%defattr(-,root,root,755) %doc Changes examples README TODO %license LICENSE ++++++ XML-XPath-1.44.tar.gz -> XML-XPath-1.47.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/Changes new/XML-XPath-1.47/Changes --- old/XML-XPath-1.44/Changes 2018-10-11 16:29:06.000000000 +0200 +++ new/XML-XPath-1.47/Changes 2022-05-13 19:16:18.000000000 +0200 @@ -1,5 +1,20 @@ Revision history for XML::XPath +1.47 2022-05-13 MANWAR + - Another bunch of patches, thanks @shawnm. + a) Get the encoding used for command line arguments from + the environment. + b) Don't assume standard input and output are UTF-8; also + get their encoding from the environment. + +1.46 2022-05-12 MANWAR + - Added missing unit test (t/52matches.t) + - Added missing unit test (t/cleanup.t) + - Added unit test for MANIFEST (t/manifest.t) + +1.45 2022-05-12 MANWAR + - Added XPath function matches(), thanks @shawnw. + 1.44 2018-10-11 MANWAR - Added new test for axis descendant. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/MANIFEST new/XML-XPath-1.47/MANIFEST --- old/XML-XPath-1.44/MANIFEST 2018-10-11 16:30:32.000000000 +0200 +++ new/XML-XPath-1.47/MANIFEST 2022-05-13 19:17:40.000000000 +0200 @@ -80,12 +80,15 @@ t/49literal.t t/50xmlxpathparsercache.t t/51elementname.t +t/52matches.t +t/cleanup.t t/rdf.t t/remove.t t/insert.t t/stress.t t/meta-json.t t/meta-yml.t +t/manifest.t examples/test.xml examples/xpath META.yml Module YAML meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/META.json new/XML-XPath-1.47/META.json --- old/XML-XPath-1.44/META.json 2018-10-11 16:30:32.000000000 +0200 +++ new/XML-XPath-1.47/META.json 2022-05-13 19:17:39.000000000 +0200 @@ -4,13 +4,13 @@ "Matt Sergeant, AxKit.com Ltd" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005", + "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "XML-XPath", "no_index" : { @@ -35,102 +35,102 @@ "requires" : { "Scalar::Util" : "1.45", "XML::Parser" : "2.23", - "perl" : "5.006" + "perl" : "5.008" } } }, "provides" : { "XML::XPath" : { "file" : "lib/XML/XPath.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Boolean" : { "file" : "lib/XML/XPath/Boolean.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Builder" : { "file" : "lib/XML/XPath/Builder.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Expr" : { "file" : "lib/XML/XPath/Expr.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Function" : { "file" : "lib/XML/XPath/Function.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Literal" : { "file" : "lib/XML/XPath/Literal.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::LocationPath" : { "file" : "lib/XML/XPath/LocationPath.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node" : { "file" : "lib/XML/XPath/Node.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node::Attribute" : { "file" : "lib/XML/XPath/Node/Attribute.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node::AttributeImpl" : { "file" : "lib/XML/XPath/Node/Attribute.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node::Comment" : { "file" : "lib/XML/XPath/Node/Comment.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node::Element" : { "file" : "lib/XML/XPath/Node/Element.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node::Namespace" : { "file" : "lib/XML/XPath/Node/Namespace.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node::PI" : { "file" : "lib/XML/XPath/Node/PI.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Node::Text" : { "file" : "lib/XML/XPath/Node/Text.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::NodeSet" : { "file" : "lib/XML/XPath/NodeSet.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Number" : { "file" : "lib/XML/XPath/Number.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Parser" : { "file" : "lib/XML/XPath/Parser.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::PerlSAX" : { "file" : "lib/XML/XPath/PerlSAX.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Root" : { "file" : "lib/XML/XPath/Root.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Step" : { "file" : "lib/XML/XPath/Step.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::Variable" : { "file" : "lib/XML/XPath/Variable.pm", - "version" : "1.44" + "version" : "1.47" }, "XML::XPath::XMLParser" : { "file" : "lib/XML/XPath/XMLParser.pm", - "version" : "1.44" + "version" : "1.47" } }, "release_status" : "stable", @@ -141,6 +141,6 @@ "web" : "https://github.com/manwar/XML-XPath" } }, - "version" : "1.44", - "x_serialization_backend" : "JSON::PP version 2.27400" + "version" : "1.47", + "x_serialization_backend" : "JSON::PP version 4.02" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/META.yml new/XML-XPath-1.47/META.yml --- old/XML-XPath-1.44/META.yml 2018-10-11 16:30:31.000000000 +0200 +++ new/XML-XPath-1.47/META.yml 2022-05-13 19:17:35.000000000 +0200 @@ -8,7 +8,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005' +generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -21,78 +21,78 @@ provides: XML::XPath: file: lib/XML/XPath.pm - version: '1.44' + version: '1.47' XML::XPath::Boolean: file: lib/XML/XPath/Boolean.pm - version: '1.44' + version: '1.47' XML::XPath::Builder: file: lib/XML/XPath/Builder.pm - version: '1.44' + version: '1.47' XML::XPath::Expr: file: lib/XML/XPath/Expr.pm - version: '1.44' + version: '1.47' XML::XPath::Function: file: lib/XML/XPath/Function.pm - version: '1.44' + version: '1.47' XML::XPath::Literal: file: lib/XML/XPath/Literal.pm - version: '1.44' + version: '1.47' XML::XPath::LocationPath: file: lib/XML/XPath/LocationPath.pm - version: '1.44' + version: '1.47' XML::XPath::Node: file: lib/XML/XPath/Node.pm - version: '1.44' + version: '1.47' XML::XPath::Node::Attribute: file: lib/XML/XPath/Node/Attribute.pm - version: '1.44' + version: '1.47' XML::XPath::Node::AttributeImpl: file: lib/XML/XPath/Node/Attribute.pm - version: '1.44' + version: '1.47' XML::XPath::Node::Comment: file: lib/XML/XPath/Node/Comment.pm - version: '1.44' + version: '1.47' XML::XPath::Node::Element: file: lib/XML/XPath/Node/Element.pm - version: '1.44' + version: '1.47' XML::XPath::Node::Namespace: file: lib/XML/XPath/Node/Namespace.pm - version: '1.44' + version: '1.47' XML::XPath::Node::PI: file: lib/XML/XPath/Node/PI.pm - version: '1.44' + version: '1.47' XML::XPath::Node::Text: file: lib/XML/XPath/Node/Text.pm - version: '1.44' + version: '1.47' XML::XPath::NodeSet: file: lib/XML/XPath/NodeSet.pm - version: '1.44' + version: '1.47' XML::XPath::Number: file: lib/XML/XPath/Number.pm - version: '1.44' + version: '1.47' XML::XPath::Parser: file: lib/XML/XPath/Parser.pm - version: '1.44' + version: '1.47' XML::XPath::PerlSAX: file: lib/XML/XPath/PerlSAX.pm - version: '1.44' + version: '1.47' XML::XPath::Root: file: lib/XML/XPath/Root.pm - version: '1.44' + version: '1.47' XML::XPath::Step: file: lib/XML/XPath/Step.pm - version: '1.44' + version: '1.47' XML::XPath::Variable: file: lib/XML/XPath/Variable.pm - version: '1.44' + version: '1.47' XML::XPath::XMLParser: file: lib/XML/XPath/XMLParser.pm - version: '1.44' + version: '1.47' requires: Scalar::Util: '1.45' XML::Parser: '2.23' - perl: '5.006' + perl: '5.008' resources: repository: https://github.com/manwar/XML-XPath.git -version: '1.44' +version: '1.47' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/Makefile.PL new/XML-XPath-1.47/Makefile.PL --- old/XML-XPath-1.44/Makefile.PL 2018-10-11 16:27:43.000000000 +0200 +++ new/XML-XPath-1.47/Makefile.PL 2022-05-13 19:14:02.000000000 +0200 @@ -10,7 +10,7 @@ AUTHOR => 'Matt Sergeant, AxKit.com Ltd', VERSION_FROM => 'lib/XML/XPath.pm', ABSTRACT_FROM => 'lib/XML/XPath.pm', - MIN_PERL_VERSION => 5.006, + MIN_PERL_VERSION => 5.008, LICENSE => 'artistic_2', EXE_FILES => [ 'examples/xpath' ], CONFIGURE_REQUIRES => { @@ -29,29 +29,29 @@ (eval { ExtUtils::MakeMaker->VERSION(6.46) } ? (META_MERGE => { 'meta-spec' => { version => 2 }, provides => { - 'XML::XPath' => { file => 'lib/XML/XPath.pm', version => '1.44' }, - 'XML::XPath::XMLParser' => { file => 'lib/XML/XPath/XMLParser.pm', version => '1.44' }, - 'XML::XPath::Parser' => { file => 'lib/XML/XPath/Parser.pm', version => '1.44' }, - 'XML::XPath::Expr' => { file => 'lib/XML/XPath/Expr.pm', version => '1.44' }, - 'XML::XPath::Function' => { file => 'lib/XML/XPath/Function.pm', version => '1.44' }, - 'XML::XPath::Literal' => { file => 'lib/XML/XPath/Literal.pm', version => '1.44' }, - 'XML::XPath::LocationPath' => { file => 'lib/XML/XPath/LocationPath.pm', version => '1.44' }, - 'XML::XPath::Number' => { file => 'lib/XML/XPath/Number.pm', version => '1.44' }, - 'XML::XPath::Node' => { file => 'lib/XML/XPath/Node.pm', version => '1.44' }, - 'XML::XPath::Node::Element' => { file => 'lib/XML/XPath/Node/Element.pm', version => '1.44' }, - 'XML::XPath::Node::Attribute' => { file => 'lib/XML/XPath/Node/Attribute.pm', version => '1.44' }, - 'XML::XPath::Node::AttributeImpl' => { file => 'lib/XML/XPath/Node/Attribute.pm', version => '1.44' }, - 'XML::XPath::Node::Text' => { file => 'lib/XML/XPath/Node/Text.pm', version => '1.44' }, - 'XML::XPath::Node::Namespace' => { file => 'lib/XML/XPath/Node/Namespace.pm', version => '1.44' }, - 'XML::XPath::Node::PI' => { file => 'lib/XML/XPath/Node/PI.pm', version => '1.44' }, - 'XML::XPath::Node::Comment' => { file => 'lib/XML/XPath/Node/Comment.pm', version => '1.44' }, - 'XML::XPath::Step' => { file => 'lib/XML/XPath/Step.pm', version => '1.44' }, - 'XML::XPath::Variable' => { file => 'lib/XML/XPath/Variable.pm', version => '1.44' }, - 'XML::XPath::NodeSet' => { file => 'lib/XML/XPath/NodeSet.pm', version => '1.44' }, - 'XML::XPath::Boolean' => { file => 'lib/XML/XPath/Boolean.pm', version => '1.44' }, - 'XML::XPath::Root' => { file => 'lib/XML/XPath/Root.pm', version => '1.44' }, - 'XML::XPath::PerlSAX' => { file => 'lib/XML/XPath/PerlSAX.pm', version => '1.44' }, - 'XML::XPath::Builder' => { file => 'lib/XML/XPath/Builder.pm', version => '1.44' }, + 'XML::XPath' => { file => 'lib/XML/XPath.pm', version => '1.47' }, + 'XML::XPath::XMLParser' => { file => 'lib/XML/XPath/XMLParser.pm', version => '1.47' }, + 'XML::XPath::Parser' => { file => 'lib/XML/XPath/Parser.pm', version => '1.47' }, + 'XML::XPath::Expr' => { file => 'lib/XML/XPath/Expr.pm', version => '1.47' }, + 'XML::XPath::Function' => { file => 'lib/XML/XPath/Function.pm', version => '1.47' }, + 'XML::XPath::Literal' => { file => 'lib/XML/XPath/Literal.pm', version => '1.47' }, + 'XML::XPath::LocationPath' => { file => 'lib/XML/XPath/LocationPath.pm', version => '1.47' }, + 'XML::XPath::Number' => { file => 'lib/XML/XPath/Number.pm', version => '1.47' }, + 'XML::XPath::Node' => { file => 'lib/XML/XPath/Node.pm', version => '1.47' }, + 'XML::XPath::Node::Element' => { file => 'lib/XML/XPath/Node/Element.pm', version => '1.47' }, + 'XML::XPath::Node::Attribute' => { file => 'lib/XML/XPath/Node/Attribute.pm', version => '1.47' }, + 'XML::XPath::Node::AttributeImpl' => { file => 'lib/XML/XPath/Node/Attribute.pm', version => '1.47' }, + 'XML::XPath::Node::Text' => { file => 'lib/XML/XPath/Node/Text.pm', version => '1.47' }, + 'XML::XPath::Node::Namespace' => { file => 'lib/XML/XPath/Node/Namespace.pm', version => '1.47' }, + 'XML::XPath::Node::PI' => { file => 'lib/XML/XPath/Node/PI.pm', version => '1.47' }, + 'XML::XPath::Node::Comment' => { file => 'lib/XML/XPath/Node/Comment.pm', version => '1.47' }, + 'XML::XPath::Step' => { file => 'lib/XML/XPath/Step.pm', version => '1.47' }, + 'XML::XPath::Variable' => { file => 'lib/XML/XPath/Variable.pm', version => '1.47' }, + 'XML::XPath::NodeSet' => { file => 'lib/XML/XPath/NodeSet.pm', version => '1.47' }, + 'XML::XPath::Boolean' => { file => 'lib/XML/XPath/Boolean.pm', version => '1.47' }, + 'XML::XPath::Root' => { file => 'lib/XML/XPath/Root.pm', version => '1.47' }, + 'XML::XPath::PerlSAX' => { file => 'lib/XML/XPath/PerlSAX.pm', version => '1.47' }, + 'XML::XPath::Builder' => { file => 'lib/XML/XPath/Builder.pm', version => '1.47' }, }, resources => { repository => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/examples/xpath new/XML-XPath-1.47/examples/xpath --- old/XML-XPath-1.44/examples/xpath 2017-07-27 17:21:25.000000000 +0200 +++ new/XML-XPath-1.47/examples/xpath 2022-05-13 19:13:23.000000000 +0200 @@ -1,19 +1,25 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; +use XML::XPath; +use I18N::Langinfo qw/langinfo CODESET/; +use Encode qw/decode/; +use open ':std', ':locale'; $| = 1; -use utf8; -use XML::XPath; -use open ':std', ':encoding(UTF-8)'; +my $codeset = langinfo(CODESET); +if ($codeset ne "") { + @ARGV = map { decode $codeset, $_ } @ARGV; +} my $SUFFIX = "\n"; my $PREFIX = ""; my $quiet = 0; my @paths; +# TODO: Use Getopt::Long for parsing? PARSE: while ((@ARGV >= 1) && ($ARGV[0] =~ /^-./ )) { OPTIONS: { if ($ARGV[0] eq "-e") { @@ -73,7 +79,8 @@ } else { $filename = 'stdin'; - $xpath = XML::XPath->new(ioref => \*STDIN); + binmode STDIN, ':raw'; # Let the XML parser decode the input + $xpath = XML::XPath->new(ioref => \*STDIN); } my $nodes = $xpath->find(shift @curpaths); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Boolean.pm new/XML-XPath-1.47/lib/XML/XPath/Boolean.pm --- old/XML-XPath-1.44/lib/XML/XPath/Boolean.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Boolean.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Boolean; -$VERSION = '1.44'; +$VERSION = '1.47'; use XML::XPath::Number; use XML::XPath::Literal; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Builder.pm new/XML-XPath-1.47/lib/XML/XPath/Builder.pm --- old/XML-XPath-1.44/lib/XML/XPath/Builder.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Builder.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Builder; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Expr.pm new/XML-XPath-1.47/lib/XML/XPath/Expr.pm --- old/XML-XPath-1.44/lib/XML/XPath/Expr.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Expr.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Expr; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Function.pm new/XML-XPath-1.47/lib/XML/XPath/Function.pm --- old/XML-XPath-1.44/lib/XML/XPath/Function.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Function.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Function; -$VERSION = '1.44'; +$VERSION = '1.47'; use XML::XPath::Number; use XML::XPath::Literal; @@ -359,6 +359,37 @@ return XML::XPath::Literal->new($_); } +sub _re_flags { + my $opts = ""; + my $fn = shift; + for my $flag (split //, shift) { + if ($flag =~ /[smix]/) { + $opts .= $flag; + } elsif ($flag ne 'q') { + die "$fn: unknown flag $flag\n"; + } + } + return $opts eq '' ? '' : "(?$opts)"; +} + +sub matches { + my $self = shift; + my ($node, @params) = @_; + die "matches: wrong number of params\n" if @params < 2 || @params > 3; + my $str = $params[0]->string_value; + my $re = $params[1]->string_value; + if (@params == 3) { + my $flags = $params[2]->string_value; + my $opts = _re_flags('matches', $flags); + if ($flags =~ /q/) { + $re = $opts . quotemeta($re); + } else { + $re = $opts . $re; + } + } + return $str =~ /$re/ ? XML::XPath::Boolean->True : XML::XPath::Boolean->False; +} + ### BOOLEAN FUNCTIONS ### sub boolean { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Literal.pm new/XML-XPath-1.47/lib/XML/XPath/Literal.pm --- old/XML-XPath-1.44/lib/XML/XPath/Literal.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Literal.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Literal; -$VERSION = '1.44'; +$VERSION = '1.47'; use XML::XPath::Boolean; use XML::XPath::Number; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/LocationPath.pm new/XML-XPath-1.47/lib/XML/XPath/LocationPath.pm --- old/XML-XPath-1.44/lib/XML/XPath/LocationPath.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/LocationPath.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::LocationPath; -$VERSION = '1.44'; +$VERSION = '1.47'; use Scalar::Util qw(blessed); use XML::XPath::Root; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Node/Attribute.pm new/XML-XPath-1.47/lib/XML/XPath/Node/Attribute.pm --- old/XML-XPath-1.44/lib/XML/XPath/Node/Attribute.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Node/Attribute.pm 2022-05-13 19:13:27.000000000 +0200 @@ -4,7 +4,7 @@ use vars qw/@ISA $VERSION/; @ISA = ('XML::XPath::Node'); -$VERSION = '1.44'; +$VERSION = '1.47'; package XML::XPath::Node::AttributeImpl; @@ -12,7 +12,7 @@ @ISA = ('XML::XPath::NodeImpl', 'XML::XPath::Node::Attribute'); use XML::XPath::Node ':node_keys'; -$VERSION = '1.44'; +$VERSION = '1.47'; sub new { my $class = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Node/Comment.pm new/XML-XPath-1.47/lib/XML/XPath/Node/Comment.pm --- old/XML-XPath-1.44/lib/XML/XPath/Node/Comment.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Node/Comment.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Node::Comment; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use vars qw/@ISA/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Node/Element.pm new/XML-XPath-1.47/lib/XML/XPath/Node/Element.pm --- old/XML-XPath-1.44/lib/XML/XPath/Node/Element.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Node/Element.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Node::Element; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use vars qw/@ISA/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Node/Namespace.pm new/XML-XPath-1.47/lib/XML/XPath/Node/Namespace.pm --- old/XML-XPath-1.44/lib/XML/XPath/Node/Namespace.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Node/Namespace.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Node::Namespace; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use vars qw/@ISA/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Node/PI.pm new/XML-XPath-1.47/lib/XML/XPath/Node/PI.pm --- old/XML-XPath-1.44/lib/XML/XPath/Node/PI.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Node/PI.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Node::PI; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use vars qw/@ISA/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Node/Text.pm new/XML-XPath-1.47/lib/XML/XPath/Node/Text.pm --- old/XML-XPath-1.44/lib/XML/XPath/Node/Text.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Node/Text.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Node::Text; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use vars qw/@ISA/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Node.pm new/XML-XPath-1.47/lib/XML/XPath/Node.pm --- old/XML-XPath-1.44/lib/XML/XPath/Node.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Node.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Node; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use vars qw(@ISA @EXPORT $AUTOLOAD %EXPORT_TAGS @EXPORT_OK); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/NodeSet.pm new/XML-XPath-1.47/lib/XML/XPath/NodeSet.pm --- old/XML-XPath-1.44/lib/XML/XPath/NodeSet.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/NodeSet.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::NodeSet; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Number.pm new/XML-XPath-1.47/lib/XML/XPath/Number.pm --- old/XML-XPath-1.44/lib/XML/XPath/Number.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Number.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Number; -$VERSION = '1.44'; +$VERSION = '1.47'; use XML::XPath::Boolean; use XML::XPath::Literal; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Parser.pm new/XML-XPath-1.47/lib/XML/XPath/Parser.pm --- old/XML-XPath-1.44/lib/XML/XPath/Parser.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Parser.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Parser; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use vars qw/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/PerlSAX.pm new/XML-XPath-1.47/lib/XML/XPath/PerlSAX.pm --- old/XML-XPath-1.44/lib/XML/XPath/PerlSAX.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/PerlSAX.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::PerlSAX; -$VERSION = '1.44'; +$VERSION = '1.47'; use XML::XPath::Node qw(:node_keys); use XML::XPath::XMLParser; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Root.pm new/XML-XPath-1.47/lib/XML/XPath/Root.pm --- old/XML-XPath-1.44/lib/XML/XPath/Root.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Root.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Root; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; use XML::XPath::XMLParser; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Step.pm new/XML-XPath-1.47/lib/XML/XPath/Step.pm --- old/XML-XPath-1.44/lib/XML/XPath/Step.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Step.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Step; -$VERSION = '1.44'; +$VERSION = '1.47'; use XML::XPath::Parser; use XML::XPath::Node; @@ -9,7 +9,7 @@ # the beginnings of using XS for this file... # require DynaLoader; # use vars qw/$VERSION @ISA/; -# $VERSION = '1.44'; +# $VERSION = '1.47'; # @ISA = qw(DynaLoader); # # bootstrap XML::XPath::Step $VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/Variable.pm new/XML-XPath-1.47/lib/XML/XPath/Variable.pm --- old/XML-XPath-1.44/lib/XML/XPath/Variable.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/Variable.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::Variable; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath/XMLParser.pm new/XML-XPath-1.47/lib/XML/XPath/XMLParser.pm --- old/XML-XPath-1.44/lib/XML/XPath/XMLParser.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath/XMLParser.pm 2022-05-13 19:13:27.000000000 +0200 @@ -1,6 +1,6 @@ package XML::XPath::XMLParser; -$VERSION = '1.44'; +$VERSION = '1.47'; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/lib/XML/XPath.pm new/XML-XPath-1.47/lib/XML/XPath.pm --- old/XML-XPath-1.44/lib/XML/XPath.pm 2018-10-11 16:26:32.000000000 +0200 +++ new/XML-XPath-1.47/lib/XML/XPath.pm 2022-05-13 19:13:27.000000000 +0200 @@ -6,14 +6,14 @@ =head1 VERSION -Version 1.44 +Version 1.47 =cut use strict; use warnings; use vars qw($VERSION $AUTOLOAD $revision); -$VERSION = '1.44'; +$VERSION = '1.47'; $XML::XPath::Namespaces = 1; $XML::XPath::ParseParamEnt = 1; $XML::XPath::Debug = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/t/52matches.t new/XML-XPath-1.47/t/52matches.t --- old/XML-XPath-1.44/t/52matches.t 1970-01-01 01:00:00.000000000 +0100 +++ new/XML-XPath-1.47/t/52matches.t 2022-05-12 22:50:43.000000000 +0200 @@ -0,0 +1,39 @@ +use strict; +use warnings; +use Test::More tests => 10; +use XML::XPath; + +my $xp = XML::XPath->new(ioref => *DATA); +ok($xp); + +my $resultset = $xp->find('matches("foo1bar", "[[:digit:]]")'); +ok($resultset->isa('XML::XPath::Boolean')); +is($resultset->to_literal(), 'true'); + +$resultset = $xp->find('matches("foobar","[[:digit:]]")'); +ok($resultset->isa('XML::XPath::Boolean')); +is($resultset->to_literal(), 'false'); + +$resultset = $xp->find('matches("foobar", "AR", "i")'); +is($resultset->to_literal(), 'true'); + +$resultset = $xp->find('matches("foobar", "AR")'); +is($resultset->to_literal(), 'false'); + +eval { + $xp->find('matches("foobar", "x", "p")'); +}; +if ($@) { + ok(1); +} else { + ok(0); +} + +$resultset = $xp->find('matches("foo[bar", "[bar", "q")'); +is($resultset->to_literal(), 'true'); + +$resultset = $xp->find('matches("foobar", "foo . ar", "x")'); +is($resultset->to_literal(), "true"); + +__DATA__ +<foo/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/t/cleanup.t new/XML-XPath-1.47/t/cleanup.t --- old/XML-XPath-1.44/t/cleanup.t 1970-01-01 01:00:00.000000000 +0100 +++ new/XML-XPath-1.47/t/cleanup.t 2022-05-12 22:50:43.000000000 +0200 @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use constant HAS_LEAKTRACE => eval{ require Test::LeakTrace }; +use Test::More HAS_LEAKTRACE ? (tests => 1) : (skip_all => 'require Test::LeakTrace'); +use Test::LeakTrace; + +use XML::XPath; +use XML::XPath::XMLParser; +$XML::XPath::SafeMode = 1; + +my $data = join '', <DATA>; +no_leaks_ok{ + my $xp = XML::XPath->new(xml => $data); + my ($root) = $xp->findnodes('/'); + $xp->cleanup; +} + +__DATA__ +<Shop id="mod3838" hello="you"> +<Cart id="1" crap="crap"> + <Item id="11" crap="crap"/> +</Cart> +<Cart id="2" crap="crap"/> +</Shop> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-XPath-1.44/t/manifest.t new/XML-XPath-1.47/t/manifest.t --- old/XML-XPath-1.44/t/manifest.t 1970-01-01 01:00:00.000000000 +0100 +++ new/XML-XPath-1.47/t/manifest.t 2022-05-12 23:31:26.000000000 +0200 @@ -0,0 +1,8 @@ +#!perl + +use strict;use warnings; +use Test::More; + +eval "use Test::CheckManifest 0.9"; +plan skip_all => "Test::CheckManifest 0.9 required" if $@; +ok_manifest({filter => [qr/\.git/]});
