NAME

Sieve::Generator::Lines::IfElse - a Sieve if/elsif/else conditional construct

VERSION

version 0.001

DESCRIPTION

An IfElse object renders a Sieve if/elsif/else construct. It consists of a required condition and true-branch, optional additional condition/branch pairs for elsif clauses, and an optional final else branch.

PERL VERSION

This module is shipped with no promise about what version of perl it will require in the future. In practice, this tends to mean "you need a perl from the last three years," but you can't rely on that. If a new version of perl ship, this software may begin to require it for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

ATTRIBUTES

cond

This attribute holds the condition for the if clause. It may be a plain string or an object doing Sieve::Generator::Text.

true

This attribute holds the block or command to execute when the if condition is true. It should be an object doing Sieve::Generator::Lines.

elsifs

This attribute holds an arrayref of alternating condition/block pairs for elsif clauses. Each pair follows the same rules as cond and true. If not provided, no elsif clauses are rendered.

else

This attribute holds the block or command for the plain else clause. If not provided, no else clause is rendered.

AUTHOR

Ricardo Signes <rjbs@semiotic.systems>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.