pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/p5-XML-Twig - updated to 3.32



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cf3ffc01c404
branches:  trunk
changeset: 544594:cf3ffc01c404
user:      rhaen <rhaen%pkgsrc.org@localhost>
date:      Wed Jul 16 12:06:07 2008 +0000

description:
- updated to 3.32
- took maintainership
- updated DEPENDS for testing purposes (not required)

ChangeLog:
version: 3.32
date: $Date: 2007-11-13T18:10:03.393214Z $
# minor maintenance release with a bug fix
fix:  change to the regexp that parses XPath-like conditions so
      it can accept leading non-ascii letters ([^\W\d] does not
      work), not used in perl 5.005
fix:  set use utf8 (except in 5.005), which gets rid of the dreaded
      "SWASHNEW" error in 5.6. fixed things that then broke in 5.6.


version: 3.31
# minor maintenance release, fixing some tests
tests: fixes to stop tests from failing in various configurations


Changes in 3.30


      fixed a couple of bugs in namespace handling, spotted by
      Shlomo Yonas (see https://rt.cpan.org/Ticket/Display.html?id=27617
      and http://www.perlmonks.org/?node_id=624830)

      added the XML::Twig::Elt fields method which returns a list of
      fields

      added the normalize method in XML::Twig and XML::Twig::Elt,
      which merge together consecutive pcdata elements. As much as
      possible (so far after a cut, delete or erase), the twig is
      kept normalized, eg there are no consecutive #PCDATA elements
      in it. Suggestion of someone whose name (and emails) I can't
      find at the moment.

      added the indented_a / cvs format for pretty_print, that makes the
      output friendly to line-oriented version control tools, as described
      in http://tinyurl.com/2kwscq (RT #24954). Thanks to Sjur Moshagen
      for a patch that I adapted to the current version.

      fixed bug RT #25113: system entities were not properly resolved
      if the XML file was not in the current directory. Thanks to
      Dave Charness for the patch.

      Added the XML::Twig method finish_now that terminates parsing
      immediately, without checking the rest of the XML. This feature was
      half suggested by Nick Clayton

      added the -s option to xml_split, which splits when the given
      size is reached for a file, suggested by Radek Saturka.

      added the -g option to xml_split, which groups elements to be
      split, suggested and tested by Dhirendra Singh Kholia.

      added the safe_parsefile_html and safe_parseurl_html methods,
      and a --html option to xml_grep. Suggested by Bill Ricker.

      by default xml_grep now skips non well-formed files, the
      --strict option makes it die when it finds one

      fixed a bunch of bugs in xml_grep

      fixed a warning when using optional modules with a version
      number that includes an _, spotted and fix suggested by
      Bill Ricker.

      Fixed test failure on cygwin, thanks to Erik Rantapaa for the
      patch.

      Fixed a bunch of typos in docs, RT #25836, spotted and fixed by David
      Steinbrunner

      Improved re-use of XML::Twig objects for repetitive parsing. It
      looks like it should be OK now , but I am sure I haven't tested
      all cases yet (especially when DTDs and entities are involved).

      HTML parsing improved: XML::Twig now tries to find the proper
      encoding for the document (that's not done by HTML::TreeBuilder
      at the moment).

      XML::Twig::Elt purge and flush methods now only purge/flush up to
      the element, not up to the current element in the twig (duh!)

      Fixed bug in handlers of the form elt[string(subelt)="foo"] and
      elt[string(subelt)=1] which did not work at all

      fixed bug in parameter entity output, spotted by BenHopkins on
      perlmonks (see http://www.perlmonks.org/?node_id=618360)

      fixed bug in xml_string: options were not used

      improved error reporting for missing SYSTEM entities, including
      the option to set twig_expand_external_ents to -1, which makes
      missing SYSTEM entities not fatal, but reports them in
      $t->{twig_missing_system_entities} Thanks to Frank Wegmann for
      his suggestions and for testing the various versions of the feature

      fixed internals so new versions of Pod::Coverage won't barf

Changes in 3.29

      fixed a bug in the handling of handlers after an ignore (RT #24392,
      reported by Robert Eden).

Changes in 3.28

      now builds on Windows and OS2

      refactored the code that triggers handlers,
      more complex expressions can now be handled,
      such as '/doc/section[@def="1"]/title'

      COMPATIBILITY WARNING

      Up to version 3.26, you could change the attribute
      of a parent of a node on which you had a handler,
      and be able to trigger a handler on that parent node
      based on the new attribute value:
      XML::Twig->new( twig_handlers =>
        { 'sect/title'          => sub { $_->parent->set_att( has_title => 1)},
          'sect[@has_title="1"]'=> sub { ... }, # called for any sect that has
        }                                       # a title
                    );
      This won't work now. The trigger expression ('sect[@has_title="1"]')
      is evaluated strictly against the input XML. This is more logical and
      consistent (if you changed the element name, the new name was never
      used in the evaluation of the trigger).
      The only exception to that rule is if you use "private attributes":
      attributes which name starts with a '#'. By definition this in an invalid
      XML name, so it can't be in the input, and has to have been created . In
      that case the code that evaluates the trigger looks at the attribute in
      the element in the tree in memory (if it exists).
      So in the example above, if you replace 'has_title' by '#has_title',
      everything will work fine. Note that private attributes are not output
      when using the print/sprint/xml_string... methods.

      fixed xml_pp so it does not leave a tempfile
      and a broken original file all when the original
      file is not well-formed.

      added the nparse_pp method that does an nparse
      with pretty_print set to 'indented', nparse_e
      that sets error_context, and nparse_ppe that
      does both

      added XML::Twig::Elt tag_to_span and tag_to_div
      methods (turn an element into a span/div and
      set its class to the old tag name)

      added the quote option for XML::Twig new, which
      sets the output quote character for attributes
      ('single' or 'double')

      added the text_only and xml_text_only methods
      that return the text of the element, but not of
      the sub-elements.

      added outer_xml method (synonym for sprint)

      fixed bug where entity names were not matched
      properly (RT #22854, spotted by Bob Faist)

      fixed bug  on some DOCTYPE config with
      twig_print_outside_roots

      fixed bug in set_keep_encoding (the method,
      not the option).

      fixed bug in simplify: the code attempted to
      replace variables in attribute values even if no
      option required it, spotted by Klaus Rush

      clean-up and fixed bugs in ignore: the method
      can now be called from a regular handler (it
      always could but the docs did not say so,
      thanks to kudra for noticing this). It can
      also be called to ignore a parent of the current
      element. There were bugs there, and the tree
      was not built properly

      added error message when an XPath query with
      a leading / is used on a node that does not
      belong to a whole twig (because it's been cut
      or because the twig itself went out of scope)

      when parsing HTML with error_context set, the
      HTML is indented, in order to give better error
      report

diffstat:

 textproc/p5-XML-Twig/Makefile         |  11 +++++---
 textproc/p5-XML-Twig/distinfo         |  10 ++++----
 textproc/p5-XML-Twig/patches/patch-aa |  41 +++++++++++++++++++++-------------
 3 files changed, 37 insertions(+), 25 deletions(-)

diffs (97 lines):

diff -r 0cd8d881b4e6 -r cf3ffc01c404 textproc/p5-XML-Twig/Makefile
--- a/textproc/p5-XML-Twig/Makefile     Wed Jul 16 09:53:50 2008 +0000
+++ b/textproc/p5-XML-Twig/Makefile     Wed Jul 16 12:06:07 2008 +0000
@@ -1,22 +1,25 @@
-# $NetBSD: Makefile,v 1.14 2008/06/12 02:14:51 joerg Exp $
+# $NetBSD: Makefile,v 1.15 2008/07/16 12:06:07 rhaen Exp $
 #
 
-DISTNAME=      XML-Twig-3.26
+DISTNAME=      XML-Twig-3.32
 PKGNAME=       p5-${DISTNAME}
 SVR4_PKGNAME=  p5xtw
 CATEGORIES=    textproc perl5
 MASTER_SITES=  http://www.xmltwig.com/xmltwig/ \
                ${MASTER_SITE_PERL_CPAN:=XML/}
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+MAINTAINER=    rhaen%NetBSD.org@localhost
 HOMEPAGE=      http://www.xmltwig.com/
 COMMENT=       Efficient XML document interface
 
 DEPENDS+=      p5-XML-Parser>=2.23:../../textproc/p5-XML-Parser
 
-# These are only needed for the test target
+# The modules listed below are required for testing purposes only
+# they are not required for building the package
+#DEPENDS+=     p5-HTML-Tree-[0-9]*:../../www/p5-HTML-Tree
 #DEPENDS+=     p5-IO-stringy-[0-9]*:../../devel/p5-IO-stringy
 #DEPENDS+=     p5-Test-Pod-[0-9]*:../../devel/p5-Test-Pod
+#DEPENDS+=     p5-Test-Pod-Coverage>=1.0:../../devel/p5-Test-Pod-Coverage
 #DEPENDS+=     p5-Text-Iconv-[0-9]*:../../converters/p5-Text-Iconv
 #DEPENDS+=     p5-Tie-IxHash-[0-9]*:../../devel/p5-Tie-IxHash
 #DEPENDS+=     p5-Unicode-Map8-[0-9]*:../../converters/p5-Unicode-Map8
diff -r 0cd8d881b4e6 -r cf3ffc01c404 textproc/p5-XML-Twig/distinfo
--- a/textproc/p5-XML-Twig/distinfo     Wed Jul 16 09:53:50 2008 +0000
+++ b/textproc/p5-XML-Twig/distinfo     Wed Jul 16 12:06:07 2008 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.7 2006/11/06 13:40:41 obache Exp $
+$NetBSD: distinfo,v 1.8 2008/07/16 12:06:07 rhaen Exp $
 
-SHA1 (XML-Twig-3.26.tar.gz) = 48908a87f96929e1424fe525702f7e960dc72099
-RMD160 (XML-Twig-3.26.tar.gz) = 04f779fbcf14c2dcb7fc4793f48470278239398c
-Size (XML-Twig-3.26.tar.gz) = 314894 bytes
-SHA1 (patch-aa) = 6abdbfdaf5c22020b34006cf13a097ad891ca782
+SHA1 (XML-Twig-3.32.tar.gz) = f8fb38e0e088f2c56c7eb4d804d943872e6ddf98
+RMD160 (XML-Twig-3.32.tar.gz) = 922374f2e8907a13629569e8fdd9c2f86c32f412
+Size (XML-Twig-3.32.tar.gz) = 345665 bytes
+SHA1 (patch-aa) = 350c2a1529de24171bdd7772d97e87d5f156a061
 SHA1 (patch-ab) = 1f7703b0cb1218b01f5187d86c98c6266f66d8ef
diff -r 0cd8d881b4e6 -r cf3ffc01c404 textproc/p5-XML-Twig/patches/patch-aa
--- a/textproc/p5-XML-Twig/patches/patch-aa     Wed Jul 16 09:53:50 2008 +0000
+++ b/textproc/p5-XML-Twig/patches/patch-aa     Wed Jul 16 12:06:07 2008 +0000
@@ -1,19 +1,28 @@
-$NetBSD: patch-aa,v 1.3 2005/02/19 19:32:21 wiz Exp $
+$NetBSD: patch-aa,v 1.4 2008/07/16 12:06:07 rhaen Exp $
 
---- Makefile.PL.orig   2005-02-10 13:27:15.000000000 +0100
-+++ Makefile.PL
-@@ -10,13 +10,9 @@ xml_pp|y|XML pretty printer
- xml_grep|y|XML grep - grep XML files using XML::Twig's subset of XPath
- xml_split|y|split big XML files
- xml_merge|y|merge back files created by xml_split
--xml_spellcheck|y|spellcheck XML files skipping tags
- QUERIES
-     my ($program, $default, $description) = split /\|/, $_;
--    if (prompt("Do you want to install '$program' ($description)?", 
--               $default) =~ /^y/) {
--      push(@programs, $program);
--    }
-+    push(@programs, $program);
- }
+--- Makefile.PL.orig   2008-07-16 12:11:33.000000000 +0200
++++ Makefile.PL        2008-07-16 12:13:14.000000000 +0200
+@@ -12,22 +12,7 @@
+ );
+ 
+ my @programs;
+-
+-if( $ARGV[0] eq "-n")
+-  { @programs=(); }
+-elsif( $ARGV[0] eq "-y")
+-  { @programs= map { $_->[0] } @prompts; }
+-elsif( $ARGV[0] eq "-d")
+-  { @programs= map { $_->[0] if( $_->[1] eq 'y') } @prompts; }
+-else
+-  { print "run 'perl Makefile.PL -y' to install all tools,\n",
+-          "    'perl Makefile.PL -n' to skip installation\n";
+-    foreach my $prompt (@prompts)
+-      { my ($program, $default, $description) = @$prompt;
+-        if( prompt("Do you want to install '$program' ($description)?", $default) =~ /^y/)
+-          { push(@programs, $program); }
+-      }
+-  }
++@programs= map { $_->[0] } @prompts;
  
  WriteMakefile(
+     NAME             => 'XML::Twig',



Home | Main Index | Thread Index | Old Index