/usr/share/perl5/CQL/ProxNode.pm is in libcql-parser-perl 1.12-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | package CQL::ProxNode;
use strict;
use warnings;
use base qw( CQL::BooleanNode );
use CQL::ProxModifierSet;
=head1 NAME
CQL::ProxNode - represents a PROX node in a CQL parse tree
=head1 SYNOPSIS
use CQL::ProxNode;
my $node = CQL::ProxNode->new( left => $left );
$node->addSecondTerm( $right );
=head1 DESCRIPTION
=head1 METHODS
=head1 new()
Creates a new, incomplete, proximity node with the
specified left-hand side. No right-hand side is specified at
this stage: that must be specified later, using the
addSecondSubterm() method. (That may seem odd, but
it's just easier to write the parser that way.)
Proximity paramaters may be added at any time,
before or after the right-hand-side sub-tree is added.
my $prox = CQL::ProxNode->new( $term );
=cut
sub new {
my ($class,$left) = @_;
my $self = $class->SUPER::new( left => $left, right => undef );
$self->{modifierSet} = CQL::ProxModifierSet->new( 'prox' );
return $self;
}
=head2 addSecondTerm()
=cut
sub addSecondTerm {
my ($self,$term) = @_;
$self->{right} = $term;
}
=head2 addModifier()
=cut
sub addModifier {
my ($self,$type,$value) = @_;
$self->{modifierSet}->addModifier( $type, $value );
}
=head2 getModifiers()
=cut
sub getModifiers {
return shift->{modifierSet}->getModifiers();
}
=head2 op()
=cut
sub op {
return shift->{modifierSet}->toCQL();
}
=head2 opXCQL()
=cut
sub opXCQL {
my ($self,$level) = @_;
return $self->{modifierSet}->toXCQL( $level, 'boolean' );
}
1;
|