Man pages sections > man3 > Attean::Expression

Attean::Expression - SPARQL Expressions

Attean::Expression(3pm) User Contributed Perl Documentation Attean::Expression(3pm)

NAME

Attean::Expression - SPARQL Expressions

VERSION

This document describes Attean::Expression version 0.017

SYNOPSIS

  use v5.14;
  use Attean;
  my $binding = Attean::Result->new();
  my $value = Attean::ValueExpression->new( value => Attean::Literal->integer(2) );
  my $plus = Attean::BinaryExpression->new( children => [$value, $value], operator => '+' );
  my $result = $plus->evaluate($binding);
  say $result->numeric_value; # 4

DESCRIPTION

This is a utility package that defines all the Attean SPARQL expression classes consisting of logical, numeric, and function operators, constant terms, and variables. Expressions may be evaluated in the context of a Attean::API::Result object, and either return a Attean::API::Term object or throw a type error exception.
The expression classes are:
Attean::ValueExpression
Attean::UnaryExpression
Attean::BinaryExpression
Attean::FunctionExpression

BUGS

Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/attean/issues>.

SEE ALSO

<http://www.perlrdf.org/>

AUTHOR

Gregory Todd Williams "<gwilliams@cpan.org>" Copyright (c) 2014--2016 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2017-10-02 perl v5.26.0