diff -Nru libxml-xpathengine-perl-0.12/Changes libxml-xpathengine-perl-0.13/Changes --- libxml-xpathengine-perl-0.12/Changes 2009-02-04 11:12:03.000000000 +0000 +++ libxml-xpathengine-perl-0.13/Changes 2011-10-14 10:42:15.000000000 +0000 @@ -1,5 +1,10 @@ Revision history for XML::XPathEngine +version 0.13 +added: error, with (hopefully!) proper error message when trying to + follow XML axes from a litteral, see + http://stackoverflow.com/questions/7761509/xpath-expression-to-access-parent-or-sibling-using-htmltreebuilderxpath-modul + version 0.12 added: findvalues method which returns the results as a list of strings diff -Nru libxml-xpathengine-perl-0.12/debian/changelog libxml-xpathengine-perl-0.13/debian/changelog --- libxml-xpathengine-perl-0.12/debian/changelog 2011-10-27 09:50:30.000000000 +0000 +++ libxml-xpathengine-perl-0.13/debian/changelog 2011-10-16 14:31:54.000000000 +0000 @@ -1,3 +1,23 @@ +libxml-xpathengine-perl (0.13-1) unstable; urgency=low + + [ Ryan Niebur ] + * Email change: Ryan Niebur -> ryan@debian.org + + [ Ansgar Burchardt ] + * debian/control: Convert Vcs-* fields to Git. + + [ gregor herrmann ] + * New upstream release. + * Build depend on Test::More 0.88. + * Switch to source format 3.0 (quilt); remove quilt framework. + * debian/copyright: update formatting. + * Set Standards-Version to 3.9.2, remove version from perl build + dependency. + * Bump debhelper compatibility level to 8. + * Remove runtime dependency on libtest-simple-perl. + + -- gregor herrmann Sun, 16 Oct 2011 16:31:24 +0200 + libxml-xpathengine-perl (0.12-2) unstable; urgency=low [ Nathan Handler ] diff -Nru libxml-xpathengine-perl-0.12/debian/compat libxml-xpathengine-perl-0.13/debian/compat --- libxml-xpathengine-perl-0.12/debian/compat 2011-10-27 09:50:30.000000000 +0000 +++ libxml-xpathengine-perl-0.13/debian/compat 2011-10-16 14:31:54.000000000 +0000 @@ -1 +1 @@ -7 +8 diff -Nru libxml-xpathengine-perl-0.12/debian/control libxml-xpathengine-perl-0.13/debian/control --- libxml-xpathengine-perl-0.12/debian/control 2011-10-27 09:50:30.000000000 +0000 +++ libxml-xpathengine-perl-0.13/debian/control 2011-10-16 14:31:54.000000000 +0000 @@ -1,21 +1,23 @@ Source: libxml-xpathengine-perl Section: perl Priority: optional -Build-Depends: debhelper (>= 7.0.8), quilt (>= 0.46-7) -Build-Depends-Indep: libtest-pod-coverage-perl, libtest-pod-perl, - perl (>= 5.8.8-7) +Build-Depends: debhelper (>= 8) +Build-Depends-Indep: perl, + libtest-pod-coverage-perl, + libtest-pod-perl, + perl (>= 5.10.1) | libtest-simple-perl (>= 0.88) Maintainer: Debian Perl Group Uploaders: Jeremiah C. Foster , gregor herrmann , Damyan Ivanov , - Ryan Niebur -Standards-Version: 3.8.2 + Ryan Niebur +Standards-Version: 3.9.2 Homepage: http://search.cpan.org/dist/XML-XPathEngine/ -Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libxml-xpathengine-perl/ -Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libxml-xpathengine-perl/ +Vcs-Git: git://git.debian.org/pkg-perl/packages/libxml-xpathengine-perl.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libxml-xpathengine-perl.git Package: libxml-xpathengine-perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, libtest-simple-perl +Depends: ${misc:Depends}, ${perl:Depends} Description: re-usable XPath engine for DOM-like trees XML::XPathEngine provides an XPath engine, that can be re-used by other module/classes that implement trees. diff -Nru libxml-xpathengine-perl-0.12/debian/copyright libxml-xpathengine-perl-0.13/debian/copyright --- libxml-xpathengine-perl-0.12/debian/copyright 2011-10-27 09:50:30.000000000 +0000 +++ libxml-xpathengine-perl-0.13/debian/copyright 2011-10-16 14:31:54.000000000 +0000 @@ -1,33 +1,33 @@ -Format-Specification: - http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 -Upstream-Maintainer: Michel Rodriguez -Upstream-Source: http://search.cpan.org/dist/XML-XPathEngine/ -Upstream-Name: XML-XPathEngine +Format-Specification: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=135 +Maintainer: Michel Rodriguez +Source: http://search.cpan.org/dist/XML-XPathEngine/ +Name: XML-XPathEngine Files: * -Copyright: Copyright (C) 2006 Michel Rodriguez - Most code copyright (C) 2000 AxKit.com Ltd -License-Alias: Perl -License: Artistic | GPL-1+ +Copyright: 2006, Michel Rodriguez + 2000, AxKit.com Ltd +License: Artistic or GPL-1+ Files: debian/* Copyright: 2007, Jeremiah C. Foster 2008, Damyan Ivanov 2008, Roberto C. Sanchez - 2008-2009, gregor herrmann - 2009, Ryan Niebur -License: Artistic | GPL-1+ + 2008-2011, gregor herrmann + 2009, Ryan Niebur > +License: Artistic or GPL-1+ License: Artistic - This program is free software; you can redistribute it and/or modify - it under the terms of the Artistic License, which comes with Perl. - On Debian GNU/Linux systems, the complete text of the Artistic License - can be found in `/usr/share/common-licenses/Artistic' + This program is free software; you can redistribute it and/or modify + it under the terms of the Artistic License, which comes with Perl. + . + On Debian systems, the complete text of the Artistic License can be + found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL' + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + . + On Debian systems, the complete text of version 1 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-1'. diff -Nru libxml-xpathengine-perl-0.12/debian/README.source libxml-xpathengine-perl-0.13/debian/README.source --- libxml-xpathengine-perl-0.12/debian/README.source 2011-10-27 09:50:30.000000000 +0000 +++ libxml-xpathengine-perl-0.13/debian/README.source 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -This package uses quilt to manage all modifications to the upstream -source. Changes are stored in the source package as diffs in -debian/patches and applied during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. diff -Nru libxml-xpathengine-perl-0.12/debian/rules libxml-xpathengine-perl-0.13/debian/rules --- libxml-xpathengine-perl-0.12/debian/rules 2011-10-27 09:50:30.000000000 +0000 +++ libxml-xpathengine-perl-0.13/debian/rules 2011-10-16 14:31:54.000000000 +0000 @@ -1,4 +1,4 @@ #!/usr/bin/make -f %: - dh --with quilt $@ + dh $@ diff -Nru libxml-xpathengine-perl-0.12/debian/source/format libxml-xpathengine-perl-0.13/debian/source/format --- libxml-xpathengine-perl-0.12/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ libxml-xpathengine-perl-0.13/debian/source/format 2011-10-27 09:50:31.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru libxml-xpathengine-perl-0.12/lib/XML/XPathEngine/Literal.pm libxml-xpathengine-perl-0.13/lib/XML/XPathEngine/Literal.pm --- libxml-xpathengine-perl-0.12/lib/XML/XPathEngine/Literal.pm 2008-04-14 07:33:32.000000000 +0000 +++ libxml-xpathengine-perl-0.13/lib/XML/XPathEngine/Literal.pm 2011-10-14 09:59:47.000000000 +0000 @@ -4,6 +4,7 @@ use XML::XPathEngine::Boolean; use XML::XPathEngine::Number; use strict; +use Carp; use overload '""' => \&value, @@ -67,8 +68,9 @@ sub string_value { return $_[0]->value; } -sub getChildNodes { return wantarray ? () : []; } -sub getAttributes { return wantarray ? () : []; } +sub getChildNodes { croak "cannot get child nodes of a literal"; } +sub getAttributes { croak "cannot get attributes of a literal"; } +sub getParentNode { croak "cannot get parent node of a literal"; } 1; __END__ diff -Nru libxml-xpathengine-perl-0.12/lib/XML/XPathEngine.pm libxml-xpathengine-perl-0.13/lib/XML/XPathEngine.pm --- libxml-xpathengine-perl-0.12/lib/XML/XPathEngine.pm 2009-02-04 11:12:33.000000000 +0000 +++ libxml-xpathengine-perl-0.13/lib/XML/XPathEngine.pm 2011-10-14 10:42:52.000000000 +0000 @@ -5,7 +5,7 @@ use vars qw($VERSION $AUTOLOAD $revision); -$VERSION = '0.12'; +$VERSION = '0.13'; $XML::XPathEngine::Namespaces = 0; $XML::XPathEngine::DEBUG = 0; diff -Nru libxml-xpathengine-perl-0.12/MANIFEST libxml-xpathengine-perl-0.13/MANIFEST --- libxml-xpathengine-perl-0.12/MANIFEST 2007-01-21 19:29:05.000000000 +0000 +++ libxml-xpathengine-perl-0.13/MANIFEST 2011-10-14 10:43:31.000000000 +0000 @@ -20,3 +20,4 @@ t/01_basic.t t/minidom.pm t/minitree.pm +META.json Module JSON meta-data (added by MakeMaker) diff -Nru libxml-xpathengine-perl-0.12/META.json libxml-xpathengine-perl-0.13/META.json --- libxml-xpathengine-perl-0.12/META.json 1970-01-01 00:00:00.000000000 +0000 +++ libxml-xpathengine-perl-0.13/META.json 2011-10-14 10:43:31.000000000 +0000 @@ -0,0 +1,41 @@ +{ + "abstract" : "a re-usable XPath engine for DOM-like trees", + "author" : [ + "Michel Rodriguez " + ], + "dynamic_config" : 1, + "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150", + "license" : [ + "unknown" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "XML-XPathEngine", + "no_index" : { + "directory" : [ + "t", + "inc" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : 0 + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : 0 + } + }, + "runtime" : { + "requires" : { + "Test::More" : 0 + } + } + }, + "release_status" : "stable", + "version" : "0.13" +} diff -Nru libxml-xpathengine-perl-0.12/META.yml libxml-xpathengine-perl-0.13/META.yml --- libxml-xpathengine-perl-0.12/META.yml 2009-04-27 07:28:33.000000000 +0000 +++ libxml-xpathengine-perl-0.13/META.yml 2011-10-14 10:43:31.000000000 +0000 @@ -1,14 +1,22 @@ ---- #YAML:1.0 -name: XML-XPathEngine -version: 0.12 -abstract: a re-usable XPath engine for DOM-like trees -license: ~ -author: - - Michel Rodriguez -generated_by: ExtUtils::MakeMaker version 6.42 -distribution_type: module -requires: - Test::More: 0 +--- +abstract: 'a re-usable XPath engine for DOM-like trees' +author: + - 'Michel Rodriguez ' +build_requires: + ExtUtils::MakeMaker: 0 +configure_requires: + ExtUtils::MakeMaker: 0 +dynamic_config: 1 +generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150' +license: unknown meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.3.html - version: 1.3 + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: XML-XPathEngine +no_index: + directory: + - t + - inc +requires: + Test::More: 0 +version: 0.13 diff -Nru libxml-xpathengine-perl-0.12/t/01_basic.t libxml-xpathengine-perl-0.13/t/01_basic.t --- libxml-xpathengine-perl-0.12/t/01_basic.t 2009-02-04 11:11:20.000000000 +0000 +++ libxml-xpathengine-perl-0.13/t/01_basic.t 2011-10-14 10:40:22.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 33; +use Test::More; use XML::XPathEngine; BEGIN { push @INC, './t'; } @@ -73,6 +73,17 @@ is( join( '|', $xp->findvalues( '//kid1[@att1=~/v[345]/]', $tree)), 'vkid3|vkid5', "findvalues match on attributes"); is( join( '|', $xp->findvalues( '//kid1[@att1=~/v[345]/]/@id', $tree)), 'i9|i15', "findvalues on attributes"); +is( $xp->findvalue( '2', $tree), 2, 'findvalues on a litteral'); +is( $xp->findvalue( '//gkid1="gvkid1"', $tree), 1, 'findvalues on a litteral'); +eval { $xp->findvalues( '//gkid1="gvkid1"/ggkid', $tree); }; +like( $@, qr/cannot get child nodes of a literal/, 'children axis from a litteral'); +eval { $xp->findvalues( '//gkid1="gvkid1"/../gkid1', $tree); }; +like( $@, qr/cannot get parent node of a literal/, 'parent axis from a litteral'); +eval { $xp->findvalues( '//gkid1="gvkid1"/@att', $tree); }; +like( $@, qr/cannot get attributes of a literal/, 'attribute axis from a litteral'); + +done_testing(); + sub init_tree { my $id=0;