Hello community,

here is the log from the commit of package perl-XML-Twig for openSUSE:Factory 
checked in at 2014-09-17 17:24:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XML-Twig (Old)
 and      /work/SRC/openSUSE:Factory/.perl-XML-Twig.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-XML-Twig"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-XML-Twig/perl-XML-Twig.changes      
2014-03-22 18:02:25.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-XML-Twig.new/perl-XML-Twig.changes 
2014-09-17 17:24:33.000000000 +0200
@@ -1,0 +2,14 @@
+Mon Sep 15 15:15:20 UTC 2014 - co...@suse.com
+
+- updated to 3.48
+ - fixed: missing entities when parsing HTML
+   RT #93604 https://rt.cpan.org/Public/Bug/Display.html?id=93604
+ 
+ - fixed: tests failed when using a version of HTML::TreeBuilder with a 
non-numeric version
+ 
+ - fixed in twig_handlers, '=' in regexps on attributes are turned into 'eq'
+   RT #94295 https://rt.cpan.org/Public/Bug/Display.html?id=94295
+ 
+ - fixed: test failed on Windows
+
+-------------------------------------------------------------------

Old:
----
  XML-Twig-3.46.tar.gz

New:
----
  XML-Twig-3.48.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-XML-Twig.spec ++++++
--- /var/tmp/diff_new_pack.X6fJn4/_old  2014-09-17 17:24:34.000000000 +0200
+++ /var/tmp/diff_new_pack.X6fJn4/_new  2014-09-17 17:24:34.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-XML-Twig
-Version:        3.46
+Version:        3.48
 Release:        0
 %define cpan_name XML-Twig
 Summary:        A perl module for processing huge XML documents in tree mode.

++++++ XML-Twig-3.46.tar.gz -> XML-Twig-3.48.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/Changes new/XML-Twig-3.48/Changes
--- old/XML-Twig-3.46/Changes   2014-03-03 15:08:40.000000000 +0100
+++ new/XML-Twig-3.48/Changes   2014-03-30 08:22:48.000000000 +0200
@@ -1,5 +1,23 @@
 CHANGES
 
+3.48 - 2014-03-30 - minor maintenance release
+
+- fixed tests 
+
+3.47 - 2014-03-27 - minor maintenance release
+
+- fixed: missing entities when parsing HTML
+  RT #93604 https://rt.cpan.org/Public/Bug/Display.html?id=93604
+
+- fixed: tests failed when using a version of HTML::TreeBuilder with a 
non-numeric version
+
+- fixed in twig_handlers, '=' in regexps on attributes are turned into 'eq'
+  RT #94295 https://rt.cpan.org/Public/Bug/Display.html?id=94295
+
+3.46 - 2014-03-05 - minor maintenance release
+
+- fixed: test failed on Windows
+
 3.45 - 2014-02-27 - minor maintenance release
 
 - fixed: link to idented_a format description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/MANIFEST new/XML-Twig-3.48/MANIFEST
--- old/XML-Twig-3.46/MANIFEST  2014-03-05 11:27:46.000000000 +0100
+++ new/XML-Twig-3.48/MANIFEST  2014-03-30 10:54:19.000000000 +0200
@@ -128,6 +128,7 @@
 t/test_3_42.t
 t/test_3_44.t
 t/test_3_45.t
+t/test_3_47.t
 t/test_changes.t
 t/test_memory.t
 t/test_wrapped.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/META.json new/XML-Twig-3.48/META.json
--- old/XML-Twig-3.46/META.json 2014-03-05 11:27:46.000000000 +0100
+++ new/XML-Twig-3.48/META.json 2014-03-30 10:54:19.000000000 +0200
@@ -42,5 +42,5 @@
          "url" : "http://github.com/mirod/xmltwig";
       }
    },
-   "version" : "3.46"
+   "version" : "3.48"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/META.yml new/XML-Twig-3.48/META.yml
--- old/XML-Twig-3.46/META.yml  2014-03-05 11:27:46.000000000 +0100
+++ new/XML-Twig-3.48/META.yml  2014-03-30 10:54:19.000000000 +0200
@@ -21,4 +21,4 @@
   XML::Parser: 2.23
 resources:
   repository: http://github.com/mirod/xmltwig
-version: 3.46
+version: 3.48
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/Twig.pm new/XML-Twig-3.48/Twig.pm
--- old/XML-Twig-3.46/Twig.pm   2014-03-03 17:10:25.000000000 +0100
+++ new/XML-Twig-3.48/Twig.pm   2014-03-30 10:54:15.000000000 +0200
@@ -144,7 +144,7 @@
 
 BEGIN
 { 
-$VERSION = '3.46';
+$VERSION = '3.48';
 
 use XML::Parser;
 my $needVersion = '2.23';
@@ -154,7 +154,7 @@
 ($perl_version= $])=~ s{_\d+}{};
 
 if( $perl_version >= 5.008) 
-  { eval "use Encode qw( :all)";
+  { eval "use Encode qw( :all)"; ## no critic ProhibitStringyEval
     $FB_XMLCREF  = 0x0400; # Encode::FB_XMLCREF;
     $FB_HTMLCREF = 0x0200; # Encode::FB_HTMLCREF;
   }
@@ -996,6 +996,7 @@
 
     $xml.= _as_XML( $tree);
 
+
     _fix_xml( $tree, \$xml);
 
     if( $options->{indent}) { _indent_xhtml( \$xml); }
@@ -1142,7 +1143,7 @@
                          if( $new_att ne $att) { $node->{$new_att}= delete 
$node->{$att}; }
                        }
 
-                    if ( $empty_element_map->{$tag} and !@{ 
$node->{'_content'} || []} )
+                    if ( $empty_element_map->{$tag} && (!@{ 
$node->{'_content'} || []}) )
                       { $xml.= $node->starttag_XML( undef, 1 ); }
                     else 
                       { $xml.= $node->starttag_XML(undef); }
@@ -1175,7 +1176,9 @@
                   )
                 )
               }
-              {&}gx;    # Needs to be escaped to amp
+              {&}gx if 0;    # Needs to be escaped to amp
+
+    $html=~ s{&}{&}g;
 
     # in old versions of HTML::TreeBuilder & can come out as &Amp;
     if( $HTML::TreeBuilder::VERSION && $HTML::TreeBuilder::VERSION <= 3.23) { 
$html=~ s{&Amp;}{&amp;}g; }
@@ -1299,7 +1302,7 @@
       $version ||= 0;
       if( $disallowed{$module})   { return 0; }
       if( $used{$module})         { return 1; }
-      if( eval "require $module") { import $module; $used{$module}= 1; 
+      if( eval "require $module") { import $module; $used{$module}= 1;  # no 
critic ProhibitStringyEval
                                     if( $version)
                                       { 
                                         ## no critic 
(TestingAndDebugging::ProhibitNoStrict);
@@ -1316,7 +1319,7 @@
 
 # used to solve the [n] predicates while avoiding getting the entire list
 # needs a prototype to accept passing bare blocks
-sub _first_n(&$@)       ## nocritic 
(Subroutines::ProhibitSubroutinePrototypes);
+sub _first_n(&$@)       ## no critic 
(Subroutines::ProhibitSubroutinePrototypes);
   { my $coderef= shift;
     my $n= shift;         
     my $i=0;
@@ -1762,7 +1765,8 @@
 sub _parse_predicate_in_handler
   { my( $flag, $score)= @_[1..2];
     $_[0]=~ s{(   ($REG_STRING)                            # strings
-                 |\@($REG_TAG_NAME)(?=\s*(?:[><=!]|!~|=~)) # @att (followed by 
a comparison operator)
+                 |\@($REG_TAG_NAME)(\s* $REG_MATCH \s* $REG_REGEXP) # @att and 
regexp
+                 |\@($REG_TAG_NAME)(?=\s*(?:[><=!]))       # @att followed by 
a comparison operator
                  |\@($REG_TAG_NAME)                        # @att (not 
followed by a comparison operator)
                  |=~|!~                                    # matching operators
                  |([><]=?|=|!=)(?=\s*[\d+-])               # test before a 
number
@@ -1777,8 +1781,8 @@
                  |($REG_TAG_IN_PREDICATE)                  # nested tag name 
(needs to be after all other unquoted strings)
                  
               )}
-             { my( $token, $str, $att, $bare_att, $num_test, $alpha_test, 
$func, $str_regexp, $str_test_alpha, $str_test_num, $and_or, $tag) 
-               = ( $1,     $2,   $3,   $4,        $5,        $6,          $7,  
  $8,          $9,              $10,           $11,     $12); 
+             { my( $token, $str, $att_re_name, $att_re_regexp, $att, 
$bare_att, $num_test, $alpha_test, $func, $str_regexp, $str_test_alpha, 
$str_test_num, $and_or, $tag) 
+               = ( $1,     $2,   $3,           $4,             $5,   $6,       
 $7,        $8,          $9,    $10,         $11,             $12,           
$13,     $14); 
     
                $score->{predicates}++;
               
@@ -1790,6 +1794,9 @@
                elsif( $att)           { $att=~ m{^#} ? qq{ (\$elt->{'$ST_ELT'} 
&& \$elt->{'$ST_ELT'}->{att}->{'$att'})}
                                                      : qq{\$elt->{'$att'}}
                                       }
+               elsif( $att_re_name)   { $att_re_name=~ m{^#} ? qq{ 
(\$elt->{'$ST_ELT'} && 
\$elt->{'$ST_ELT'}->{att}->{'$att_re_name'}$att_re_regexp)}
+                                                     : 
qq{\$elt->{'$att_re_name'}$att_re_regexp}
+                                      }
                                         # for some reason Devel::Cover flags 
the following lines as not tested. They are though.
                elsif( $bare_att)      { $bare_att=~ m{^#} ? 
qq{(\$elt->{'$ST_ELT'} && defined(\$elt->{'$ST_ELT'}->{att}->{'$bare_att'}))}
                                                           : qq{defined( 
\$elt->{'$bare_att'})}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/Twig_pm.slow 
new/XML-Twig-3.48/Twig_pm.slow
--- old/XML-Twig-3.46/Twig_pm.slow      2014-03-03 15:18:33.000000000 +0100
+++ new/XML-Twig-3.48/Twig_pm.slow      2014-03-30 10:50:04.000000000 +0200
@@ -144,7 +144,7 @@
 
 BEGIN
 { 
-$VERSION = '3.46';
+$VERSION = '3.48';
 
 use XML::Parser;
 my $needVersion = '2.23';
@@ -154,7 +154,7 @@
 ($perl_version= $])=~ s{_\d+}{};
 
 if( $perl_version >= 5.008) 
-  { eval "use Encode qw( :all)";
+  { eval "use Encode qw( :all)"; ## no critic ProhibitStringyEval
     $FB_XMLCREF  = 0x0400; # Encode::FB_XMLCREF;
     $FB_HTMLCREF = 0x0200; # Encode::FB_HTMLCREF;
   }
@@ -996,6 +996,7 @@
 
     $xml.= _as_XML( $tree);
 
+
     _fix_xml( $tree, \$xml);
 
     if( $options->{indent}) { _indent_xhtml( \$xml); }
@@ -1142,7 +1143,7 @@
                          if( $new_att ne $att) { $node->{$new_att}= delete 
$node->{$att}; }
                        }
 
-                    if ( $empty_element_map->{$tag} and !@{ 
$node->{'_content'} || []} )
+                    if ( $empty_element_map->{$tag} && (!@{ 
$node->{'_content'} || []}) )
                       { $xml.= $node->starttag_XML( undef, 1 ); }
                     else 
                       { $xml.= $node->starttag_XML(undef); }
@@ -1175,7 +1176,9 @@
                   )
                 )
               }
-              {&amp;}gx;    # Needs to be escaped to amp
+              {&amp;}gx if 0;    # Needs to be escaped to amp
+
+    $html=~ s{&}{&amp;}g;
 
     # in old versions of HTML::TreeBuilder &amp; can come out as &Amp;
     if( $HTML::TreeBuilder::VERSION && $HTML::TreeBuilder::VERSION <= 3.23) { 
$html=~ s{&Amp;}{&amp;}g; }
@@ -1299,7 +1302,7 @@
       $version ||= 0;
       if( $disallowed{$module})   { return 0; }
       if( $used{$module})         { return 1; }
-      if( eval "require $module") { import $module; $used{$module}= 1; 
+      if( eval "require $module") { import $module; $used{$module}= 1;  # no 
critic ProhibitStringyEval
                                     if( $version)
                                       { 
                                         ## no critic 
(TestingAndDebugging::ProhibitNoStrict);
@@ -1316,7 +1319,7 @@
 
 # used to solve the [n] predicates while avoiding getting the entire list
 # needs a prototype to accept passing bare blocks
-sub _first_n(&$@)       ## nocritic 
(Subroutines::ProhibitSubroutinePrototypes);
+sub _first_n(&$@)       ## no critic 
(Subroutines::ProhibitSubroutinePrototypes);
   { my $coderef= shift;
     my $n= shift;         
     my $i=0;
@@ -1762,7 +1765,8 @@
 sub _parse_predicate_in_handler
   { my( $flag, $score)= @_[1..2];
     $_[0]=~ s{(   ($REG_STRING)                            # strings
-                 |\@($REG_TAG_NAME)(?=\s*(?:[><=!]|!~|=~)) # @att (followed by 
a comparison operator)
+                 |\@($REG_TAG_NAME)(\s* $REG_MATCH \s* $REG_REGEXP) # @att and 
regexp
+                 |\@($REG_TAG_NAME)(?=\s*(?:[><=!]))       # @att followed by 
a comparison operator
                  |\@($REG_TAG_NAME)                        # @att (not 
followed by a comparison operator)
                  |=~|!~                                    # matching operators
                  |([><]=?|=|!=)(?=\s*[\d+-])               # test before a 
number
@@ -1777,8 +1781,8 @@
                  |($REG_TAG_IN_PREDICATE)                  # nested tag name 
(needs to be after all other unquoted strings)
                  
               )}
-             { my( $token, $str, $att, $bare_att, $num_test, $alpha_test, 
$func, $str_regexp, $str_test_alpha, $str_test_num, $and_or, $tag) 
-               = ( $1,     $2,   $3,   $4,        $5,        $6,          $7,  
  $8,          $9,              $10,           $11,     $12); 
+             { my( $token, $str, $att_re_name, $att_re_regexp, $att, 
$bare_att, $num_test, $alpha_test, $func, $str_regexp, $str_test_alpha, 
$str_test_num, $and_or, $tag) 
+               = ( $1,     $2,   $3,           $4,             $5,   $6,       
 $7,        $8,          $9,    $10,         $11,             $12,           
$13,     $14); 
     
                $score->{predicates}++;
               
@@ -1790,6 +1794,9 @@
                elsif( $att)           { $att=~ m{^#} ? qq{ (\$elt->{'$ST_ELT'} 
&& \$elt->{'$ST_ELT'}->{att}->{'$att'})}
                                                      : qq{\$elt->{'$att'}}
                                       }
+               elsif( $att_re_name)   { $att_re_name=~ m{^#} ? qq{ 
(\$elt->{'$ST_ELT'} && 
\$elt->{'$ST_ELT'}->{att}->{'$att_re_name'}$att_re_regexp)}
+                                                     : 
qq{\$elt->{'$att_re_name'}$att_re_regexp}
+                                      }
                                         # for some reason Devel::Cover flags 
the following lines as not tested. They are though.
                elsif( $bare_att)      { $bare_att=~ m{^#} ? 
qq{(\$elt->{'$ST_ELT'} && defined(\$elt->{'$ST_ELT'}->{att}->{'$bare_att'}))}
                                                           : qq{defined( 
\$elt->{'$bare_att'})}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/t/test_3_47.t 
new/XML-Twig-3.48/t/test_3_47.t
--- old/XML-Twig-3.46/t/test_3_47.t     1970-01-01 01:00:00.000000000 +0100
+++ new/XML-Twig-3.48/t/test_3_47.t     2014-03-30 08:20:18.000000000 +0200
@@ -0,0 +1,45 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use XML::Twig;
+use Test::More tests => 3;
+
+use utf8;
+
+# test CDATA sections in HTML escaping 
https://rt.cpan.org/Ticket/Display.html?id=86773
+
+               # module              =>  XML::Twig->new options
+my %html_conv= ( 'HTML::TreeBuilder' =>  {},
+                 'HTML::Tidy'        =>  { use_tidy => 1 },
+               );
+foreach my $module ( sort keys  %html_conv)
+  { SKIP: 
+      { eval "use $module";
+        skip "$module not available", 1 if 1 ;
+
+        my $in = q{<h1>Here&amp;there v&amp;r;</h1><p>marco&amp;company; and 
marco&amp;company &pound; &#163; &#xA3; £</p>};
+        my $expected= q{<h1>Here&amp;there v&amp;r;</h1><p>marco&amp;company; 
and marco&amp;company £ £ £ £</p>};
+
+        my $parser= XML::Twig->new( %{$html_conv{$module}});
+        my $t = $parser->safe_parse_html($in);
+        print $@ if $@;
+
+        like $t->sprint, qr{\Q$expected\E}, "In and out are the same 
($module)";
+
+      }
+  }
+
+{ # test RT #94295 https://rt.cpan.org/Public/Bug/Display.html?id=94295
+  # in twig_handlers, '=' in regexps on attributes are turned into 'eq'
+  my $xml= '<doc><e dn="foo=1 host=0">e1</e><e dn="foo=1 host=2">e2</e></doc>';
+  my $r;
+  my $t= XML::Twig->new( twig_handlers => { 'e[@dn =~ /host=0/]' => sub { $r.= 
$_->text } })
+                  ->parse( $xml);
+  is( $r, 'e1', 'regexp on attribute, including an = sign');
+}
+exit;
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/t/test_changes.t 
new/XML-Twig-3.48/t/test_changes.t
--- old/XML-Twig-3.46/t/test_changes.t  2014-03-03 15:12:48.000000000 +0100
+++ new/XML-Twig-3.48/t/test_changes.t  2014-03-29 11:11:40.000000000 +0100
@@ -3,5 +3,5 @@
 use Test::More;
 eval 'use Test::CPAN::Changes';
 plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
-plan skip_all => 'uthor test. Set $ENV{TEST_AUTHOR} to a true value to run.' 
if ! $ENV{TEST_AUTHOR};
+plan skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' 
if ! $ENV{TEST_AUTHOR};
 changes_ok(); 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/t/test_xml_split.t 
new/XML-Twig-3.48/t/test_xml_split.t
--- old/XML-Twig-3.46/t/test_xml_split.t        2012-05-17 12:24:59.000000000 
+0200
+++ new/XML-Twig-3.48/t/test_xml_split.t        2014-03-27 16:17:12.000000000 
+0100
@@ -91,7 +91,7 @@
 sub test_error
   { my( $command, $options, $expected)= @_;
     my( $stdout, $stderr, $success, $exit_code) = 
IO::CaptureOutput::capture_exec( "$perl $command $options test_xml_split.xml");
-    matches( $stderr, qr/^$expected/, "$command $options");
+    matches( $stderr, qr/$expected/, "$command $options");
   }
 
 sub test_out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XML-Twig-3.46/tools/xml_grep/xml_grep 
new/XML-Twig-3.48/tools/xml_grep/xml_grep
--- old/XML-Twig-3.46/tools/xml_grep/xml_grep   2012-05-17 12:24:59.000000000 
+0200
+++ new/XML-Twig-3.48/tools/xml_grep/xml_grep   2014-03-28 12:21:29.000000000 
+0100
@@ -12,7 +12,8 @@
     $count, $nb_results, $nb_results_per_file,
     $encoding, @exclude,
     $wrap, $nowrap, $descr, $group, $pretty_print, $version, $text_only, 
$date, 
-    $html, $tidy,
+    $html, $tidy, 
+    $add_ns,
     $verbose, $strict
   );
 
@@ -46,6 +47,7 @@
             'strict'          => \$strict,
             'html'            => \$html,
             'tidy'            => \$tidy,
+            'add_ns'          => \$add_ns,
             'verbose'         => \$verbose,
     ) or pod2usage(2);
 

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to