MarpaX-xPathLike

 view release on metacpan or  search on metacpan

lib/MarpaX/xPathLike.pm  view on Meta::CPAN

        values =>sub{
            my @r = $operatorBy->{values}->($operData->{values});
            return @r;
        }
    );
    #print 'operdata = ', Dumper $operData;
    my @r = map {$types{$_}->()} grep {exists $types{$_}} keys %$operData;
    return @r if wantarray();
    return $r[0];
}
sub _naryOper(&$$;@){
        my ($oper,$x,$y,@e) = @_;
        $x = _operation($x) if ref $x;
        $y = _operation($y) if ref $y;
        my $res = $oper->($x,$y);
        foreach my $e (@e){
            $e = _operation($e) if ref $e;
            $res = $oper->($res,$e);
        }
        return $res
}
sub _logicalOper(&$$){
        my ($oper,$x,$y) = @_;
        #print "x=", Dumper $x;
        #print "y=", Dumper $y;
        my @x = ($x);
        my @y = ($y);
        @x = _operation($x) if ref $x and ref $x ne q|Regexp|;
        @y = _operation($y) if ref $y and ref $y ne q|Regexp|;
        #my @r = eval {};
        #warn qq|Warning: $@| if $@;
        foreach my $x (@x){



( run in 0.798 second using v1.01-cache-2.11-cpan-49f99fa48dc )