Cucumber::TagExpressions::Node(3pm) User Contributed Perl Documentation Cucumber::TagExpressions::Node(3pm)

Cucumber::TagExpressions::Node - Cucumber Tag expression components

  use Cucumber::TagExpressions;
  my $expr = Cucumber::TagExpressions->parse( '@a and @b' );
  if ( $expr->evaluate( qw/x y z/ ) ) {
     say "The evaluation returned false";
  }

This module defines the components making up the tag expressions.

Returns "true" when the tag set specified in $tags satisfies the condition(s) of the expression, "false" otherwise.

@tags can be a list of tags to be used in the expression. It can also be a reference to a hash with the keys being the tags and the values being considered boolean values indicating whether the tag (key) is considered part of the tagset (true) or not (false).

Returns a string representation of the expression node.

DESCRIPTION

This node class returns "true" if the literal tag is specified as part of the tag-list in the expression evaluation.

ATTRIBUTES

tag

The tag to test presence for.

DESCRIPTION

This node class type evaluates one or more sub-expressions ("terms") and returns "false" if any of the terms does. It returns "true" if all of the terms return "true".

ATTRIBUTES

terms

The sub-expressions to evaluate.

DESCRIPTION

This node class type evaluates one or more sub-expressions ("terms") and returns "true" if any of the terms does. It returns "false" if all of the terms return "false".

ATTRIBUTES

terms

The sub-expressions to evaluate.

DESCRIPTION

This class wraps one of the other node class types, negating its result on evaluation.

ATTRIBUTES

expression

The wrapped node class instance for which to negate the result.

DESCRIPTION

This class models the outer-most node in the tag expression; it wraps all other nodes and is the entry-point for tag expression evaluation.

ATTRIBUTES

sub_expression

An instance of one of the other node class types.

Please see the included LICENSE for the canonical version. In summary:

The MIT License (MIT)

  Copyright (c) 2021 Erik Huelsmann
  Copyright (c) 2021 Cucumber Ltd

This work is loosely derived from prior work of the same library for Ruby, called "cucumber-messages".

2024-01-13 perl v5.38.2