r37881 - in /trunk/libpod-abstract-perl: ./ debian/ lib/Pod/ lib/Pod/Abstract/ lib/Pod/Abstract/Filter/

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Mon Jun 8 20:55:21 UTC 2009


Author: nhandler-guest
Date: Mon Jun  8 20:55:16 2009
New Revision: 37881

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=37881
Log:
* debian/watch:
  - Update to ignore development releases.
  - Remove comments
* debian/control:
  - Add myself to list of Uploaders
* debian/copyright:
  - Add year for upstream copyright
  - Remove unneeded explanation about upstream licensing

Modified:
    trunk/libpod-abstract-perl/Changes
    trunk/libpod-abstract-perl/META.yml
    trunk/libpod-abstract-perl/debian/changelog
    trunk/libpod-abstract-perl/debian/control
    trunk/libpod-abstract-perl/debian/copyright
    trunk/libpod-abstract-perl/debian/watch
    trunk/libpod-abstract-perl/lib/Pod/Abstract.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/BuildNode.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/add_podcmds.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/clear_podcmds.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/cut.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/find.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/number_sections.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/overlay.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/sort.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/summary.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/uncut.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/unoverlay.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Node.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Parser.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Path.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Serial.pm
    trunk/libpod-abstract-perl/lib/Pod/Abstract/Tree.pm

Modified: trunk/libpod-abstract-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/Changes?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/Changes (original)
+++ trunk/libpod-abstract-perl/Changes Mon Jun  8 20:55:16 2009
@@ -1,4 +1,10 @@
 Revision history for Pod-Abstract
+
+0.18    08/06/2009
+        Replaced "=" operator with "eq", added the full set of Perl
+        compatible binary comparison operators (eq and friends, == and
+        friends). This will break your code if you used the "=" operator
+        in 0.17, you will need to change it to "eq".
 
 0.17    26/05/2009
 		Added Union and Intersection operators to paths (conjunction of

Modified: trunk/libpod-abstract-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/META.yml?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/META.yml (original)
+++ trunk/libpod-abstract-perl/META.yml Mon Jun  8 20:55:16 2009
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Pod-Abstract
-version:      0.17
+version:      0.18
 version_from: lib/Pod/Abstract.pm
 installdirs:  site
 requires:

Modified: trunk/libpod-abstract-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/debian/changelog?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/debian/changelog (original)
+++ trunk/libpod-abstract-perl/debian/changelog Mon Jun  8 20:55:16 2009
@@ -1,8 +1,15 @@
-libpod-abstract-perl (0.17-2) UNRELEASED; urgency=low
+libpod-abstract-perl (0.18-1) unstable; urgency=low
 
-  * debian/watch: Update to ignore development releases.
+  * debian/watch:
+    - Update to ignore development releases.
+    - Remove comments
+  * debian/control:
+    - Add myself to list of Uploaders
+  * debian/copyright:
+    - Add year for upstream copyright
+    - Remove unneeded explanation about upstream licensing
 
- -- Nathan Handler <nhandler at ubuntu.com>  Sat, 06 Jun 2009 01:36:57 +0000
+ -- Nathan Handler <nhandler at ubuntu.com>  Mon, 08 Jun 2009 20:54:34 +0000
 
 libpod-abstract-perl (0.17-1) unstable; urgency=low
 

Modified: trunk/libpod-abstract-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/debian/control?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/debian/control (original)
+++ trunk/libpod-abstract-perl/debian/control Mon Jun  8 20:55:16 2009
@@ -4,7 +4,7 @@
 Build-Depends: debhelper (>= 7.0.8), quilt (>= 0.46-7)
 Build-Depends-Indep: libio-string-perl, perl (>= 5.6.0-12)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Damyan Ivanov <dmn at debian.org>
+Uploaders: Damyan Ivanov <dmn at debian.org>, Nathan Handler <nhandler at ubuntu.com>
 Standards-Version: 3.8.1
 Homepage: http://search.cpan.org/dist/Pod-Abstract/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libpod-abstract-perl/

Modified: trunk/libpod-abstract-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/debian/copyright?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/debian/copyright (original)
+++ trunk/libpod-abstract-perl/debian/copyright Mon Jun  8 20:55:16 2009
@@ -5,11 +5,9 @@
 Upstream-Name: Pod-Abstract
 
 Files: *
-Copyright: Ben Lilburne <bnej at mac.com>
+Copyright: 2009, Ben Lilburne <bnej at mac.com>
 License-Alias: Perl
-License: GPL-1+|Artistic
- This program is free software; you can redistribute it and/or modify
- it under the same terms as Perl itself.
+License: GPL-1+ | Artistic
 
 Files: debian/*
 Copyright: 2009, Damyan Ivanov <dmn at debian.org>

Modified: trunk/libpod-abstract-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/debian/watch?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/debian/watch (original)
+++ trunk/libpod-abstract-perl/debian/watch Mon Jun  8 20:55:16 2009
@@ -1,4 +1,2 @@
-# format version number, currently 3; this line is compulsory!
 version=3
-# URL to the package page followed by a regex to search
 http://search.cpan.org/dist/Pod-Abstract/   .*/Pod-Abstract-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract.pm Mon Jun  8 20:55:16 2009
@@ -7,7 +7,7 @@
 use Pod::Abstract::Parser;
 use IO::String;
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/BuildNode.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/BuildNode.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/BuildNode.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/BuildNode.pm Mon Jun  8 20:55:16 2009
@@ -7,7 +7,7 @@
 use Pod::Abstract::Node;
 use base qw(Exporter);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 our @EXPORT_OK = qw(node nodes);
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter.pm Mon Jun  8 20:55:16 2009
@@ -5,7 +5,7 @@
 use Pod::Abstract;
 use UNIVERSAL qw(isa);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/add_podcmds.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/add_podcmds.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/add_podcmds.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/add_podcmds.pm Mon Jun  8 20:55:16 2009
@@ -4,7 +4,7 @@
 use base qw(Pod::Abstract::Filter);
 use Pod::Abstract::BuildNode qw(node);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 METHODS
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/clear_podcmds.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/clear_podcmds.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/clear_podcmds.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/clear_podcmds.pm Mon Jun  8 20:55:16 2009
@@ -3,7 +3,7 @@
 
 use base qw(Pod::Abstract::Filter);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 sub filter {
     my $self = shift;

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/cut.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/cut.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/cut.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/cut.pm Mon Jun  8 20:55:16 2009
@@ -4,7 +4,7 @@
 
 use base qw(Pod::Abstract::Filter);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 sub filter {
     my $self = shift;

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/find.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/find.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/find.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/find.pm Mon Jun  8 20:55:16 2009
@@ -5,7 +5,7 @@
 use base qw(Pod::Abstract::Filter);
 use Pod::Abstract::BuildNode qw(node);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/number_sections.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/number_sections.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/number_sections.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/number_sections.pm Mon Jun  8 20:55:16 2009
@@ -5,7 +5,7 @@
 use base qw( Pod::Abstract::Filter );
 use Pod::Abstract::BuildNode qw(node);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/overlay.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/overlay.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/overlay.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/overlay.pm Mon Jun  8 20:55:16 2009
@@ -6,7 +6,7 @@
 use Pod::Abstract;
 use Pod::Abstract::BuildNode qw(node);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =begin :overlay
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/sort.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/sort.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/sort.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/sort.pm Mon Jun  8 20:55:16 2009
@@ -6,7 +6,7 @@
 
 use base qw(Pod::Abstract::Filter);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 sub filter {
     my $self = shift;

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/summary.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/summary.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/summary.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/summary.pm Mon Jun  8 20:55:16 2009
@@ -4,7 +4,7 @@
 use base qw(Pod::Abstract::Filter);
 use Pod::Abstract::BuildNode qw(node);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/uncut.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/uncut.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/uncut.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/uncut.pm Mon Jun  8 20:55:16 2009
@@ -5,7 +5,7 @@
 use base qw(Pod::Abstract::Filter);
 use Pod::Abstract::BuildNode qw(node);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/unoverlay.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/unoverlay.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/unoverlay.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Filter/unoverlay.pm Mon Jun  8 20:55:16 2009
@@ -4,7 +4,7 @@
 
 use base qw(Pod::Abstract::Filter);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =begin :overlay
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Node.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Node.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Node.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Node.pm Mon Jun  8 20:55:16 2009
@@ -7,7 +7,7 @@
 
 use Scalar::Util qw(weaken);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Parser.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Parser.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Parser.pm Mon Jun  8 20:55:16 2009
@@ -6,7 +6,7 @@
 use Data::Dumper;
 use base qw(Pod::Parser);
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 new
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Path.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Path.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Path.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Path.pm Mon Jun  8 20:55:16 2009
@@ -5,10 +5,11 @@
 use Data::Dumper;
 
 use UNIVERSAL qw(isa can);
+use Pod::Abstract::BuildNode qw(node);
 
 $Data::Dumper::Indent = 1;
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 use constant CHILDREN  => 1;  # /
 use constant ALL       => 2;  # //
@@ -16,14 +17,10 @@
 use constant INDEX     => 4;  # (3)
 use constant L_SELECT  => 5;  # [
 use constant ATTR      => 6;  # @label
-use constant EQUAL     => 7;  # =
+use constant N_CMP     => 7;  # == != < <= > >=
 use constant STRING    => 8;  # 'foobar'
 use constant R_SELECT  => 9;  # ]
-use constant NOT_EQ    => 10; # <>
-use constant LESS_THAN => 11; # <
-use constant LESS_EQ   => 12; # <=
-use constant GT_THAN   => 13; # >
-use constant GT_EQ     => 14; # >=
+use constant NUM_OF    => 10; # #
 use constant NOT       => 15; # !
 use constant PARENT    => 16; # ..
 use constant MATCHES   => 17; # =~
@@ -34,6 +31,7 @@
 use constant ROOT      => 22; # ^
 use constant UNION     => 23; # |
 use constant INTERSECT => 24; # &
+use constant S_CMP     => 25; # eq lt gt le ge ne
 
 =pod
 
@@ -163,14 +161,20 @@
 Reverses the remainder of the expression. The above example will match
 anything B<without> a child head2 node.
 
-=item equality: C<[ /node1 = /node2 ]>
-
-Matches nodes that have at least one equality match. The right hand
-expression can be a constant string (single quoted: C<'string'>, or a
-second expression. If two expressions are used, they are matched
-combinationally - i.e, all result nodes on the left are matched
-against all result nodes on the right. Both sides may contain nested
-expressions.
+=item compare operators: eg. C<[ /node1 eq /node2 ]>
+
+Matches nodes where the operator is satistied for at least one pair of
+nodes. The right hand expression can be a constant string (single
+quoted: C<'string'>, or a second expression. If two expressions are
+used, they are matched combinationally - i.e, all result nodes on the
+left are matched against all result nodes on the right. Both sides may
+contain nested expressions.
+
+The following Perl compatible operators are supported:
+
+String: C< eq gt lt le ge ne >
+
+Numeric: C<<< == < > <= >= != >>>
 
 =back
 
@@ -248,6 +252,9 @@
         } elsif($expression =~ m/^\]/) {
             substr($expression,0,1) = '';
             push @l, [ R_SELECT, undef ];
+        } elsif($expression =~ m/^(eq|lt|gt|le|ge|ne)/) {
+            push @l, [ S_CMP, $1 ];
+            substr($expression,0,2) = '';
         } elsif($expression =~ m/^([#_\:a-zA-Z0-9]+)/) {
             push @l, [ NAME, $1 ];
             substr($expression, 0, length $1) = '';
@@ -276,22 +283,28 @@
         } elsif($expression =~ m/^\./) {
             push @l, [ NOP, undef ];
             substr($expression, 0, 1) = '';
-        } elsif($expression =~ m/^\!/) {
-            push @l, [ NOT, undef ];
-            substr($expression, 0, 1) = '';
         } elsif($expression =~ m/^\<\</) {
             push @l, [ PREV, undef ];
             substr($expression, 0, 2) = '';
         } elsif($expression =~ m/^\>\>/) {
             push @l, [ NEXT, undef ];
             substr($expression, 0, 2) = '';
-        } elsif($expression =~ m/^=/) {
-            push @l, [ EQUAL, undef ];
+        } elsif($expression =~ m/^(==|!=|<=|>=)/) {
+            push @l, [ N_CMP, $1 ];
+            substr($expression,0,2) = '';
+        } elsif($expression =~ m/^(<|>)/) {
+            push @l, [ N_CMP, $1 ];
+            substr($expression,0,1) = '';
+        } elsif($expression =~ m/^\!/) {
+            push @l, [ NOT, undef ];
+            substr($expression, 0, 1) = '';
+        } elsif($expression =~ m/^\%/) {
+            push @l, [ NUM_OF, undef ];
             substr($expression, 0, 1) = '';
         } elsif($expression =~ m/^'([\^']*)'/) {
             push @l, [ STRING, $1 ];
             substr($expression, 0, length( $1 ) + 2) = '';
-        } elsif($expression =~ m/([ \n\t]+)/) {
+        } elsif($expression =~ m/(\s+)/) {
             # Discard uncaptured whitespace
             substr($expression, 0, length($1)) = '';
         } else {
@@ -447,6 +460,8 @@
     my $invert = shift;
     my $exp = shift;
     my $r_exp = shift;
+    
+    my $op = shift; # Only for some operators
     
     my $nlist = [ ];
     foreach my $n(@$ilist) {
@@ -456,9 +471,9 @@
         # node lists if required.
         if(can($r_exp, 'process')) {
             my @r_list = $r_exp->process($n);
-            $t_result = $self->$test_action(\@t_list, \@r_list);
+            $t_result = $self->$test_action(\@t_list, \@r_list, $op);
         } else {
-            $t_result = $self->$test_action(\@t_list, $r_exp);
+            $t_result = $self->$test_action(\@t_list, $r_exp, $op);
         }
         $t_result = !$t_result if $invert;
         if($t_result) {
@@ -468,10 +483,11 @@
     return $nlist;
 }
 
-sub test_equal {
+sub test_cmp_op {
     my $self = shift;
     my $l_list = shift;
     my $r_exp = shift;
+    my $op = shift;
     
     if(scalar(@$r_exp) == 0 || isa($r_exp->[0],'Pod::Abstract::Node')) {
         # combination test
@@ -482,7 +498,8 @@
             foreach my $r (@$r_exp) {
                 my $rb = $r->body;
                 $rb = $r->pod unless $rb;
-                $match ++ if $lb eq $rb;
+                eval "\$match++ if \$lb $op \$rb";
+                die $@ if $@;
             }
         }
         return $match;
@@ -493,7 +510,8 @@
         foreach my $l (@$l_list) {
             my $lb = $l->body;
             $lb = $l->pod unless $lb;
-            $match ++ if $lb eq $str;
+            eval "\$match++ if \$lb $op \$str";
+            die $@ if $@;
         }
         return $match;
     } else {
@@ -683,7 +701,7 @@
             'action' => 'end_select',
         };
     } elsif(grep { $tok == $_ } 
-            (MATCHES, R_SELECT, EQUAL, UNION, INTERSECT)) {
+            (MATCHES, R_SELECT, S_CMP, N_CMP, UNION, INTERSECT)) {
         unshift @$l, $next;
         return {
             'action' => 'end_select',
@@ -796,6 +814,7 @@
     $l_exp = $class->new("select expression",$l_exp);
     my $op = shift @$l;
     my $op_tok = $op->[0];
+    my $op_val = $op->[1];
     my $exp = undef;
     
     if($op_tok == MATCHES) {
@@ -814,7 +833,7 @@
         } else {
             die "Expected REGEXP, got ", Dumper([$re_tok]);
         }
-    } elsif($op_tok == EQUAL) {
+    } elsif($op_tok == S_CMP || $op_tok == N_CMP) {
         my $rh = shift @$l;
         my $rh_tok = $rh->[0];
         my $r_exp = undef;
@@ -828,8 +847,8 @@
         }
         $exp = {
             action => 'match_expression',
-            arguments => [ 'test_equal', 0,
-                           $l_exp, $r_exp ],
+            arguments => [ 'test_cmp_op', 0,
+                           $l_exp, $r_exp, $op_val ],
         };
     } elsif($op_tok == R_SELECT) {
         # simple expression

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Serial.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Serial.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Serial.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Serial.pm Mon Jun  8 20:55:16 2009
@@ -1,6 +1,6 @@
 package Pod::Abstract::Serial;
 use strict;
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 my $serial_number = 0;
 

Modified: trunk/libpod-abstract-perl/lib/Pod/Abstract/Tree.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpod-abstract-perl/lib/Pod/Abstract/Tree.pm?rev=37881&op=diff
==============================================================================
--- trunk/libpod-abstract-perl/lib/Pod/Abstract/Tree.pm (original)
+++ trunk/libpod-abstract-perl/lib/Pod/Abstract/Tree.pm Mon Jun  8 20:55:16 2009
@@ -1,7 +1,7 @@
 package Pod::Abstract::Tree;
 use strict;
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 =head1 NAME
 




More information about the Pkg-perl-cvs-commits mailing list